aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xtask/src/codegen/rust.ungram20
1 files changed, 20 insertions, 0 deletions
diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram
index 02f5aa732..b14801f24 100644
--- a/xtask/src/codegen/rust.ungram
+++ b/xtask/src/codegen/rust.ungram
@@ -1,3 +1,7 @@
1//*************************//
2// Names, Paths and Macros //
3//*************************//
4
1Name = 5Name =
2 'ident' 6 'ident'
3 7
@@ -50,6 +54,10 @@ MacroStmts =
50 statements:Stmt* 54 statements:Stmt*
51 Expr? 55 Expr?
52 56
57//*************************//
58// Items //
59//*************************//
60
53SourceFile = 61SourceFile =
54 'shebang'? 62 'shebang'?
55 Attr* 63 Attr*
@@ -245,6 +253,10 @@ Visibility =
245Attr = 253Attr =
246 '#' '!'? '[' Path ('=' Literal | TokenTree)? ']' 254 '#' '!'? '[' Path ('=' Literal | TokenTree)? ']'
247 255
256//****************************//
257// Statements and Expressions //
258//****************************//
259
248Stmt = 260Stmt =
249 ExprStmt 261 ExprStmt
250| Item 262| Item
@@ -434,6 +446,10 @@ AwaitExpr =
434BoxExpr = 446BoxExpr =
435 Attr* 'box' Expr 447 Attr* 'box' Expr
436 448
449//*************************//
450// Types //
451//*************************//
452
437Type = 453Type =
438 ArrayType 454 ArrayType
439| DynTraitType 455| DynTraitType
@@ -495,6 +511,10 @@ TypeBound =
495 'lifetime' 511 'lifetime'
496| '?'? Type 512| '?'? Type
497 513
514//************************//
515// Patterns //
516//************************//
517
498Pat = 518Pat =
499 IdentPat 519 IdentPat
500| BoxPat 520| BoxPat