Add MacroItems and MacroStmts in grammer.ron

This commit is contained in:
Edwin Cheng 2019-04-19 02:47:29 +08:00
parent 403cd78bae
commit 3ff5440a50
7 changed files with 132 additions and 8 deletions

View file

@ -247,6 +247,10 @@ Grammar(
"ARG_LIST",
"TYPE_BOUND",
"TYPE_BOUND_LIST",
// macro related
"MACRO_ITEMS",
"MACRO_STMTS",
],
ast: {
"SourceFile": (
@ -668,5 +672,16 @@ Grammar(
"TypeArg": (options: ["TypeRef"]),
"AssocTypeArg": (options: ["NameRef", "TypeRef"]),
"LifetimeArg": (),
"MacroItems": (
traits: [ "ModuleItemOwner", "FnDefOwner" ],
),
"MacroStmts" : (
options: [ "Expr" ],
collections: [
["statements", "Stmt"],
],
)
},
)