diff options
author | Aleksey Kladov <[email protected]> | 2018-08-07 22:53:03 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-08-07 22:53:03 +0100 |
commit | 64a65a4ff40e0c9b6d9453af79bba013afde2ffa (patch) | |
tree | 9b8b488b35fae3f5497f86d67c18ed5fd63d5c7f /src/grammar/items/consts.rs | |
parent | 2fb854ccdae6f1f12b60441e5c3b283bdc81fb0a (diff) |
trait items
Diffstat (limited to 'src/grammar/items/consts.rs')
-rw-r--r-- | src/grammar/items/consts.rs | 5 |
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 | } |