Unnamed repository; edit this file 'description' to name the repository.
Merge rust-analyzer/ungrammar#19
19: Add YieldExpr r=lnicola a=sasurau4 Adding YieldExpr Part of https://github.com/rust-analyzer/rust-analyzer/pull/7209 ref: https://doc.rust-lang.org/beta/unstable-book/language-features/generators.html Co-authored-by: Daiki Ihara <[email protected]>
bors[bot] 2021-01-12
parent b3fbe22 · parent 0189e1d · commit dfd51f9
-rw-r--r--lib/ungrammar/Cargo.toml2
-rw-r--r--lib/ungrammar/rust.ungram4
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/ungrammar/Cargo.toml b/lib/ungrammar/Cargo.toml
index d2d67e9249..ffc01e3aca 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.6.0"
+version = "1.7.0"
license = "MIT OR Apache-2.0"
repository = "https://github.com/matklad/ungrammar"
authors = ["Aleksey Kladov <[email protected]>"]
diff --git a/lib/ungrammar/rust.ungram b/lib/ungrammar/rust.ungram
index d6471d2279..13d5968e35 100644
--- a/lib/ungrammar/rust.ungram
+++ b/lib/ungrammar/rust.ungram
@@ -351,6 +351,7 @@ Expr =
| TryExpr
| TupleExpr
| WhileExpr
+| YieldExpr
Literal =
Attr* value:(
@@ -491,6 +492,9 @@ MatchGuard =
ReturnExpr =
Attr* 'return' Expr?
+YieldExpr =
+ Attr* 'yield' Expr?
+
AwaitExpr =
Attr* Expr '.' 'await'