diff options
-rw-r--r-- | xtask/src/codegen/rust.ungram | 20 |
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 | |||
1 | Name = | 5 | Name = |
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 | |||
53 | SourceFile = | 61 | SourceFile = |
54 | 'shebang'? | 62 | 'shebang'? |
55 | Attr* | 63 | Attr* |
@@ -245,6 +253,10 @@ Visibility = | |||
245 | Attr = | 253 | Attr = |
246 | '#' '!'? '[' Path ('=' Literal | TokenTree)? ']' | 254 | '#' '!'? '[' Path ('=' Literal | TokenTree)? ']' |
247 | 255 | ||
256 | //****************************// | ||
257 | // Statements and Expressions // | ||
258 | //****************************// | ||
259 | |||
248 | Stmt = | 260 | Stmt = |
249 | ExprStmt | 261 | ExprStmt |
250 | | Item | 262 | | Item |
@@ -434,6 +446,10 @@ AwaitExpr = | |||
434 | BoxExpr = | 446 | BoxExpr = |
435 | Attr* 'box' Expr | 447 | Attr* 'box' Expr |
436 | 448 | ||
449 | //*************************// | ||
450 | // Types // | ||
451 | //*************************// | ||
452 | |||
437 | Type = | 453 | Type = |
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 | |||
498 | Pat = | 518 | Pat = |
499 | IdentPat | 519 | IdentPat |
500 | | BoxPat | 520 | | BoxPat |