aboutsummaryrefslogtreecommitdiff
path: root/xtask/src/codegen
diff options
context:
space:
mode:
Diffstat (limited to 'xtask/src/codegen')
-rw-r--r--xtask/src/codegen/rust.ungram27
1 files changed, 14 insertions, 13 deletions
diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram
index 4025f7f96..a97cc80e9 100644
--- a/xtask/src/codegen/rust.ungram
+++ b/xtask/src/codegen/rust.ungram
@@ -173,6 +173,20 @@ ConstParam =
173LifetimeParam = 173LifetimeParam =
174 Attr* 'lifetime' 174 Attr* 'lifetime'
175 175
176Visibility =
177 'pub' ('('
178 'super'
179 | 'self'
180 | 'crate'
181 | 'in' Path
182 ')')?
183
184Attr =
185 '#' '!'? '[' Path ('=' input:AttrInput)? ']'
186
187AttrInput =
188 Literal | TokenTree
189
176ParenType = 190ParenType =
177 '(' TypeRef ')' 191 '(' TypeRef ')'
178 192
@@ -391,9 +405,6 @@ TupleStructPat =
391TuplePat = 405TuplePat =
392 '(' args:Pat* ')' 406 '(' args:Pat* ')'
393 407
394Visibility =
395 'pub' ('(' 'super' | 'self' | 'crate' | 'in' Path ')')?
396
397Name = 408Name =
398 'ident' 409 'ident'
399 410
@@ -416,9 +427,6 @@ MacroStmts =
416 statements:Stmt* 427 statements:Stmt*
417 Expr? 428 Expr?
418 429
419Attr =
420 '#' '!'? '[' Path ('=' input:AttrInput)? ']'
421
422TypeBound = 430TypeBound =
423 'lifetime' | 'const'? TypeRef 431 'lifetime' | 'const'? TypeRef
424 432
@@ -465,9 +473,6 @@ LifetimeArg =
465ConstArg = 473ConstArg =
466 Literal | BlockExpr BlockExpr 474 Literal | BlockExpr BlockExpr
467 475
468MetaItem =
469 Path '=' AttrInput nested_meta_items:MetaItem*
470
471AdtDef = 476AdtDef =
472 Struct 477 Struct
473| Enum 478| Enum
@@ -488,10 +493,6 @@ TypeRef =
488| ImplTraitType 493| ImplTraitType
489| DynTraitType 494| DynTraitType
490 495
491AttrInput =
492 Literal
493| TokenTree
494
495Stmt = 496Stmt =
496 LetStmt 497 LetStmt
497| ExprStmt 498| ExprStmt