Unnamed repository; edit this file 'description' to name the repository.
Merge rust-analyzer/ungrammar#43
43: Make `LetElse` its own node r=jonas-schievink a=jonas-schievink bors r+ Co-authored-by: Jonas Schievink <[email protected]>
bors[bot] 2021-10-07
parent 55dbdc4 · parent 012fa6e · commit f270b7f
-rw-r--r--lib/ungrammar/Cargo.toml2
-rw-r--r--lib/ungrammar/rust.ungram5
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/ungrammar/Cargo.toml b/lib/ungrammar/Cargo.toml
index f0172821bf..050459e109 100644
--- a/lib/ungrammar/Cargo.toml
+++ b/lib/ungrammar/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "ungrammar"
description = "A DSL for describing concrete syntax trees"
-version = "1.14.7"
+version = "1.14.8"
license = "MIT OR Apache-2.0"
repository = "https://github.com/matklad/ungrammar"
edition = "2018"
diff --git a/lib/ungrammar/rust.ungram b/lib/ungrammar/rust.ungram
index c9a36079f2..0af0f2521c 100644
--- a/lib/ungrammar/rust.ungram
+++ b/lib/ungrammar/rust.ungram
@@ -316,9 +316,12 @@ Stmt =
LetStmt =
Attr* 'let' Pat (':' Type)?
'=' initializer:Expr
- ('else' else_branch:BlockExpr)?
+ LetElse?
';'
+LetElse =
+ 'else' BlockExpr
+
ExprStmt =
Expr ';'?