Skip to content

macros/attrs: subject application rules #8

@feds01

Description

@feds01

We want to clear up the rules about how macros/attributes apply to their subjects. Currently, if they are applied to a declaration, then it falls through to the child expression of the declaration (if it exists). This rule exists because declarations aren't "real" expressions, and no one actually refers to the entire declaration when they are talking about a "struct def" or "enum def". However, there are (#dump_ast) and might be future genuine uses for targeting the declaration specifically.

However, What if someone wants to put an attribute on the declaration itself?
Originally posted by @kontheocharis in hash-org/hashc#930 (comment)

Metadata

Metadata

Assignees

Labels

languageLanguage specification related issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions