aboutsummaryrefslogtreecommitdiff
path: root/xtask/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-07-31 14:18:14 +0100
committerAleksey Kladov <[email protected]>2020-07-31 14:27:40 +0100
commit4d38b0dce1884dab0da7394ccc979eef0a21076c (patch)
treeebef2415f439b1f76291bfab2a4403ad6ffcf270 /xtask/src
parentc04c06c4bc06852610af9d37673b03a8c041b15c (diff)
Move Stmt Grammar
Diffstat (limited to 'xtask/src')
-rw-r--r--xtask/src/codegen/rust.ungram22
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 =
194Attr = 194Attr =
195 '#' '!'? '[' Path ('=' Literal | TokenTree)? ']' 195 '#' '!'? '[' Path ('=' Literal | TokenTree)? ']'
196 196
197Stmt =
198 LetStmt
199| ExprStmt
200
201LetStmt =
202 Attr* 'let' Pat (':' Type)?
203 '=' initializer:Expr ';'
204
205ExprStmt =
206 Attr* Expr ';'?
207
197Type = 208Type =
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
459ExprStmt =
460 Attr* Expr ';'
461
462LetStmt =
463 Attr* 'let' Pat (':' Type)
464 '=' initializer:Expr ';'
465
466Path = 470Path =
467 (qualifier:Path '::')? segment:PathSegment 471 (qualifier:Path '::')? segment:PathSegment
468 472
@@ -490,10 +494,6 @@ LifetimeArg =
490ConstArg = 494ConstArg =
491 Literal | BlockExpr BlockExpr 495 Literal | BlockExpr BlockExpr
492 496
493Stmt =
494 LetStmt
495| ExprStmt
496
497Pat = 497Pat =
498 OrPat 498 OrPat
499| ParenPat 499| ParenPat