Skip to content

Grammar confusion when two macro annotations are used on the same class #615

@marco-c

Description

@marco-c
class AutoEntryMonitor

yields

 |  |     |     |- {class_specifier:354} from (314, 1) to (345, 2) 
   |  |     |     |  |- {class:76} from (314, 1) to (314, 6) : class 
   |  |     |     |  |- {type_identifier:460} from (314, 7) to (314, 23) : AutoEntryMonitor 
   |  |     |     |  `- {field_declaration_list:309} from (314, 24) to (345, 2) 
   |  |     |     |     |- {{:56} from (314, 24) to (314, 25) : {
class MOZ_STACK_CLASS AutoEntryMonitor

yields

   |  |     |     |- {class_specifier:354} from (314, 1) to (345, 2) 
   |  |     |     |  |- {class:76} from (314, 1) to (314, 6) : class 
   |  |     |     |  |- {macro_annotation:424} from (314, 7) to (314, 22) : MOZ_STACK_CLASS 
   |  |     |     |  |  `- {MOZ_STACK_CLASS:236} from (314, 7) to (314, 22) : MOZ_STACK_CLASS 
   |  |     |     |  |- {type_identifier:460} from (314, 23) to (314, 39) : AutoEntryMonitor 
   |  |     |     |  `- {field_declaration_list:309} from (314, 40) to (345, 2) 
   |  |     |     |     |- {{:56} from (314, 40) to (314, 41) : {
class MOZ_STACK_CLASS JS_PUBLIC_API AutoEntryMonitor

yields

   |  |     |     |- {function_definition:267} from (314, 1) to (345, 2) 
   |  |     |     |  |- {class_specifier:354} from (314, 1) to (314, 36) : class MOZ_STACK_CLASS JS_PUBLIC_API 
   |  |     |     |  |  |- {class:76} from (314, 1) to (314, 6) : class 
   |  |     |     |  |  |- {macro_annotation:424} from (314, 7) to (314, 22) : MOZ_STACK_CLASS 
   |  |     |     |  |  |  `- {MOZ_STACK_CLASS:236} from (314, 7) to (314, 22) : MOZ_STACK_CLASS 
   |  |     |     |  |  `- {type_identifier:460} from (314, 23) to (314, 36) : JS_PUBLIC_API 
   |  |     |     |  |- {identifier:1} from (314, 37) to (314, 53) : AutoEntryMonitor 
   |  |     |     |  `- {compound_statement:300} from (314, 54) to (345, 2) 
   |  |     |     |     |- {{:56} from (314, 54) to (314, 55) : {

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions