Skip to content

Commit 1c7a5c8

Browse files
bors[bot]lf-
andauthored
Merge #37
37: Add both variants of half open range patterns to the grammar r=lf- a=lf- This is prompted by #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): #9780 Co-authored-by: Jade <software@lfcode.ca>
2 parents 074b255 + 1fec3b1 commit 1c7a5c8

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
[package]
22
name = "ungrammar"
33
description = "A DSL for describing concrete syntax trees"
4-
version = "1.14.3"
4+
version = "1.14.4"
55
license = "MIT OR Apache-2.0"
66
repository = "https://github.com/matklad/ungrammar"
7-
authors = ["Aleksey Kladov <aleksey.kladov@gmail.com>"]
87
edition = "2018"
98

109
exclude = ["/bors.toml", "/.github"]

rust.ungram

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,12 @@ WildcardPat =
603603
'_'
604604

605605
RangePat =
606-
start:Pat op:('..' | '..=') end:Pat
606+
// 1..
607+
start:Pat op:('..' | '..=')
608+
// 1..2
609+
| start:Pat op:('..' | '..=') end:Pat
610+
// ..2
611+
| op:('..' | '..=') end:Pat
607612

608613
RefPat =
609614
'&' 'mut'? Pat

0 commit comments

Comments
 (0)