Skip to content

Commit a6073ec

Browse files
Add MacroDef for "Macros 2.0"
1 parent 9e4810f commit a6073ec

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/tools/rust-analyzer/lib/ungrammar/rust.ungram

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ Item =
9090
| Impl
9191
| MacroCall
9292
| MacroRules
93+
| MacroDef
9394
| Module
9495
| Static
9596
| Struct
@@ -103,6 +104,11 @@ MacroRules =
103104
'macro_rules' '!' Name
104105
TokenTree
105106

107+
MacroDef =
108+
Attr* Visibility?
109+
'macro' Name args:TokenTree?
110+
body:TokenTree
111+
106112
Module =
107113
Attr* Visibility?
108114
'mod' Name

0 commit comments

Comments
 (0)