aboutsummaryrefslogtreecommitdiff
path: root/src/grammar/items/consts.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/grammar/items/consts.rs')
-rw-r--r--src/grammar/items/consts.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/grammar/items/consts.rs b/src/grammar/items/consts.rs
index ca26a7814..b11949b49 100644
--- a/src/grammar/items/consts.rs
+++ b/src/grammar/items/consts.rs
@@ -14,7 +14,8 @@ fn const_or_static(p: &mut Parser, kw: SyntaxKind) {
14 p.eat(MUT_KW); // TODO: validator to forbid const mut 14 p.eat(MUT_KW); // TODO: validator to forbid const mut
15 name(p); 15 name(p);
16 types::ascription(p); 16 types::ascription(p);
17 p.expect(EQ); 17 if p.eat(EQ) {
18 expressions::expr(p); 18 expressions::expr(p);
19 }
19 p.expect(SEMI); 20 p.expect(SEMI);
20} 21}