Unnamed repository; edit this file 'description' to name the repository.
Merge rust-analyzer/ungrammar#37
37: Add both variants of half open range patterns to the grammar r=lf- a=lf-
This is prompted by
https://github.com/rust-analyzer/rust-analyzer/issues/9779, but it
is not actually a prerequisite of making that one happen as this commit
doesn't change the generated code on the r-a side.
Relevant PR (that does not require this one be merged immediately/a release made): https://github.com/rust-analyzer/rust-analyzer/pull/9780
Co-authored-by: Jade <[email protected]>
| -rw-r--r-- | lib/ungrammar/Cargo.toml | 3 | ||||
| -rw-r--r-- | lib/ungrammar/rust.ungram | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/lib/ungrammar/Cargo.toml b/lib/ungrammar/Cargo.toml index 067b9b302f..79f3c39e93 100644 --- a/lib/ungrammar/Cargo.toml +++ b/lib/ungrammar/Cargo.toml @@ -1,10 +1,9 @@ [package] name = "ungrammar" description = "A DSL for describing concrete syntax trees" -version = "1.14.3" +version = "1.14.4" license = "MIT OR Apache-2.0" repository = "https://github.com/matklad/ungrammar" -authors = ["Aleksey Kladov <[email protected]>"] edition = "2018" exclude = ["/bors.toml", "/.github"] diff --git a/lib/ungrammar/rust.ungram b/lib/ungrammar/rust.ungram index 6bb123a3e2..52bdf323af 100644 --- a/lib/ungrammar/rust.ungram +++ b/lib/ungrammar/rust.ungram @@ -603,7 +603,12 @@ WildcardPat = '_' RangePat = - start:Pat op:('..' | '..=') end:Pat + // 1.. + start:Pat op:('..' | '..=') + // 1..2 + | start:Pat op:('..' | '..=') end:Pat + // ..2 + | op:('..' | '..=') end:Pat RefPat = '&' 'mut'? Pat |