Add support for let ... else

This commit is contained in:
Jonas Schievink 2021-10-06 18:15:06 +02:00
parent c675f49a46
commit 2e66cedc8b
2 changed files with 4 additions and 2 deletions

View File

@ -1,7 +1,7 @@
[package]
name = "ungrammar"
description = "A DSL for describing concrete syntax trees"
version = "1.14.6"
version = "1.14.7"
license = "MIT OR Apache-2.0"
repository = "https://github.com/matklad/ungrammar"
edition = "2018"

View File

@ -315,7 +315,9 @@ Stmt =
LetStmt =
Attr* 'let' Pat (':' Type)?
'=' initializer:Expr ';'
'=' initializer:Expr
('else' else_branch:BlockExpr)?
';'
ExprStmt =
Expr ';'?