Move Stmt Grammar

This commit is contained in:
Aleksey Kladov 2020-07-31 15:18:14 +02:00
parent c04c06c4bc
commit 4d38b0dce1
2 changed files with 96 additions and 95 deletions

View file

@ -194,6 +194,17 @@ Visibility =
Attr =
'#' '!'? '[' Path ('=' Literal | TokenTree)? ']'
Stmt =
LetStmt
| ExprStmt
LetStmt =
Attr* 'let' Pat (':' Type)?
'=' initializer:Expr ';'
ExprStmt =
Attr* Expr ';'?
Type =
ParenType
| TupleType
@ -456,13 +467,6 @@ MacroStmts =
statements:Stmt*
Expr?
ExprStmt =
Attr* Expr ';'
LetStmt =
Attr* 'let' Pat (':' Type)
'=' initializer:Expr ';'
Path =
(qualifier:Path '::')? segment:PathSegment
@ -490,10 +494,6 @@ LifetimeArg =
ConstArg =
Literal | BlockExpr BlockExpr
Stmt =
LetStmt
| ExprStmt
Pat =
OrPat
| ParenPat