mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Move Stmt Grammar
This commit is contained in:
parent
c04c06c4bc
commit
4d38b0dce1
2 changed files with 96 additions and 95 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue