Unnamed repository; edit this file 'description' to name the repository.
Merge rust-analyzer/ungrammar#16
16: Add `MacroDef` for "Macros 2.0" r=matklad a=jonas-schievink
Co-authored-by: Jonas Schievink <[email protected]>
| -rw-r--r-- | lib/ungrammar/rust.ungram | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/ungrammar/rust.ungram b/lib/ungrammar/rust.ungram index ca3cf9292a..bfa2ade2df 100644 --- a/lib/ungrammar/rust.ungram +++ b/lib/ungrammar/rust.ungram @@ -90,6 +90,7 @@ Item = | Impl | MacroCall | MacroRules +| MacroDef | Module | Static | Struct @@ -103,6 +104,11 @@ MacroRules = 'macro_rules' '!' Name TokenTree +MacroDef = + Attr* Visibility? + 'macro' Name args:TokenTree? + body:TokenTree + Module = Attr* Visibility? 'mod' Name |