diff options
author | Aleksey Kladov <[email protected]> | 2020-07-31 14:18:14 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-07-31 14:27:40 +0100 |
commit | 4d38b0dce1884dab0da7394ccc979eef0a21076c (patch) | |
tree | ebef2415f439b1f76291bfab2a4403ad6ffcf270 /xtask/src | |
parent | c04c06c4bc06852610af9d37673b03a8c041b15c (diff) |
Move Stmt Grammar
Diffstat (limited to 'xtask/src')
-rw-r--r-- | xtask/src/codegen/rust.ungram | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram index fc665b2b2..8271509cf 100644 --- a/xtask/src/codegen/rust.ungram +++ b/xtask/src/codegen/rust.ungram | |||
@@ -194,6 +194,17 @@ Visibility = | |||
194 | Attr = | 194 | Attr = |
195 | '#' '!'? '[' Path ('=' Literal | TokenTree)? ']' | 195 | '#' '!'? '[' Path ('=' Literal | TokenTree)? ']' |
196 | 196 | ||
197 | Stmt = | ||
198 | LetStmt | ||
199 | | ExprStmt | ||
200 | |||
201 | LetStmt = | ||
202 | Attr* 'let' Pat (':' Type)? | ||
203 | '=' initializer:Expr ';' | ||
204 | |||
205 | ExprStmt = | ||
206 | Attr* Expr ';'? | ||
207 | |||
197 | Type = | 208 | Type = |
198 | ParenType | 209 | ParenType |
199 | | TupleType | 210 | | TupleType |
@@ -456,13 +467,6 @@ MacroStmts = | |||
456 | statements:Stmt* | 467 | statements:Stmt* |
457 | Expr? | 468 | Expr? |
458 | 469 | ||
459 | ExprStmt = | ||
460 | Attr* Expr ';' | ||
461 | |||
462 | LetStmt = | ||
463 | Attr* 'let' Pat (':' Type) | ||
464 | '=' initializer:Expr ';' | ||
465 | |||
466 | Path = | 470 | Path = |
467 | (qualifier:Path '::')? segment:PathSegment | 471 | (qualifier:Path '::')? segment:PathSegment |
468 | 472 | ||
@@ -490,10 +494,6 @@ LifetimeArg = | |||
490 | ConstArg = | 494 | ConstArg = |
491 | Literal | BlockExpr BlockExpr | 495 | Literal | BlockExpr BlockExpr |
492 | 496 | ||
493 | Stmt = | ||
494 | LetStmt | ||
495 | | ExprStmt | ||
496 | |||
497 | Pat = | 497 | Pat = |
498 | OrPat | 498 | OrPat |
499 | | ParenPat | 499 | | ParenPat |