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)
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)