mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Add MacroItems and MacroStmts in grammer.ron
This commit is contained in:
parent
403cd78bae
commit
3ff5440a50
7 changed files with 132 additions and 8 deletions
|
@ -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"],
|
||||
],
|
||||
)
|
||||
},
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue