From 64a65a4ff40e0c9b6d9453af79bba013afde2ffa Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 8 Aug 2018 00:53:03 +0300 Subject: trait items --- src/grammar/items/consts.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/grammar/items/consts.rs') 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) { p.eat(MUT_KW); // TODO: validator to forbid const mut name(p); types::ascription(p); - p.expect(EQ); - expressions::expr(p); + if p.eat(EQ) { + expressions::expr(p); + } p.expect(SEMI); } -- cgit v1.2.3