From c13e6db774acca952577fa7a18599b75b407f3c2 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 10 Feb 2018 14:13:30 +0300 Subject: G: use names in fields --- src/parser/grammar/items/structs.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/parser') 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) { fn named_field(p: &mut Parser) { let field = p.start(); visibility(p); - if p.expect(IDENT) { + if p.at(IDENT) { + name(p); p.expect(COLON); types::type_ref(p); field.complete(p, NAMED_FIELD); -- cgit v1.2.3