Skip to content

Commit a2900d2

Browse files
committed
Add inline const expression and pattern
1 parent c87f01e commit a2900d2

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "ungrammar"
33
description = "A DSL for describing concrete syntax trees"
4-
version = "1.4.0"
4+
version = "1.5.0"
55
license = "MIT OR Apache-2.0"
66
repository = "https://github.com/matklad/ungrammar"
77
authors = ["Aleksey Kladov <[email protected]>"]

rust.ungram

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,13 +372,13 @@ BlockExpr =
372372
'}'
373373

374374
RefExpr =
375-
Attr* '&' ('raw' |'mut' | 'const') Expr
375+
Attr* '&' ('raw' | 'mut' | 'const') Expr
376376

377377
TryExpr =
378378
Attr* Expr '?'
379379

380380
EffectExpr =
381-
Attr* Label? ('try' | 'unsafe' | 'async') BlockExpr
381+
Attr* Label? ('try' | 'unsafe' | 'async' | 'const') BlockExpr
382382

383383
PrefixExpr =
384384
Attr* op:('-' | '!' | '*') Expr
@@ -582,6 +582,7 @@ Pat =
582582
| SlicePat
583583
| TuplePat
584584
| TupleStructPat
585+
| ConstBlockPat
585586

586587
LiteralPat =
587588
Literal
@@ -636,3 +637,6 @@ RestPat =
636637

637638
MacroPat =
638639
MacroCall
640+
641+
ConstBlockPat =
642+
'const' BlockExpr

0 commit comments

Comments
 (0)