File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 11[package ]
22name = " ungrammar"
33description = " A DSL for describing concrete syntax trees"
4- version = " 1.14.9 "
4+ version = " 1.15.0 "
55license = " MIT OR Apache-2.0"
66repository = " https://github.com/matklad/ungrammar"
77edition = " 2018"
Original file line number Diff line number Diff line change @@ -357,6 +357,7 @@ Expr =
357357| TupleExpr
358358| WhileExpr
359359| YieldExpr
360+ | LetExpr
360361
361362Literal =
362363 Attr* value:(
@@ -448,13 +449,9 @@ ClosureExpr =
448449 body:Expr
449450
450451IfExpr =
451- Attr* 'if' Condition then_branch:BlockExpr
452+ Attr* 'if' condition:Expr then_branch:BlockExpr
452453 ('else' else_branch:(IfExpr | BlockExpr))?
453454
454- Condition =
455- 'let' Pat '=' Expr
456- | Expr
457-
458455LoopExpr =
459456 Attr* Label? 'loop'
460457 loop_body:BlockExpr
@@ -464,7 +461,7 @@ ForExpr =
464461 loop_body:BlockExpr
465462
466463WhileExpr =
467- Attr* Label? 'while' Condition
464+ Attr* Label? 'while' condition:Expr
468465 loop_body:BlockExpr
469466
470467Label =
@@ -492,14 +489,17 @@ MatchArm =
492489 Attr* Pat guard:MatchGuard? '=>' Expr ','?
493490
494491MatchGuard =
495- 'if' ('let' Pat '=')? Expr
492+ 'if' condition: Expr
496493
497494ReturnExpr =
498495 Attr* 'return' Expr?
499496
500497YieldExpr =
501498 Attr* 'yield' Expr?
502499
500+ LetExpr =
501+ Attr* 'let' Pat '=' Expr
502+
503503AwaitExpr =
504504 Attr* Expr '.' 'await'
505505
You can’t perform that action at this time.
0 commit comments