diff options
author | Aleksey Kladov <[email protected]> | 2018-02-10 11:13:30 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-02-10 11:13:30 +0000 |
commit | c13e6db774acca952577fa7a18599b75b407f3c2 (patch) | |
tree | 88c076f6b2f6905a409f05c7617f1cd05d4596ba /src/parser/grammar/items | |
parent | 8a735b667295f8390394b2536337698cb9a384ce (diff) |
G: use names in fields
Diffstat (limited to 'src/parser/grammar/items')
-rw-r--r-- | src/parser/grammar/items/structs.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/parser/grammar/items/structs.rs b/src/parser/grammar/items/structs.rs index 3c122a56f..eca0d2e64 100644 --- a/src/parser/grammar/items/structs.rs +++ b/src/parser/grammar/items/structs.rs | |||
@@ -86,7 +86,8 @@ fn named_fields(p: &mut Parser) { | |||
86 | fn named_field(p: &mut Parser) { | 86 | fn named_field(p: &mut Parser) { |
87 | let field = p.start(); | 87 | let field = p.start(); |
88 | visibility(p); | 88 | visibility(p); |
89 | if p.expect(IDENT) { | 89 | if p.at(IDENT) { |
90 | name(p); | ||
90 | p.expect(COLON); | 91 | p.expect(COLON); |
91 | types::type_ref(p); | 92 | types::type_ref(p); |
92 | field.complete(p, NAMED_FIELD); | 93 | field.complete(p, NAMED_FIELD); |