From 645a1b5d739e7101fc63cea7950d26addd8e7be2 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 22 Jan 2018 02:21:53 +0300 Subject: Remove high-order bits from tuple struct --- src/parser/event_parser/grammar/items.rs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/parser/event_parser') diff --git a/src/parser/event_parser/grammar/items.rs b/src/parser/event_parser/grammar/items.rs index 12b6d06c7..d341dce38 100644 --- a/src/parser/event_parser/grammar/items.rs +++ b/src/parser/event_parser/grammar/items.rs @@ -127,18 +127,21 @@ fn pos_fields(p: &mut Parser) { if !p.expect(L_PAREN) { return; } - comma_list(p, R_PAREN, |p| { - pos_field(p); - true - }); - p.expect(R_PAREN); + loop { + if p.at(R_PAREN) || p.at(EOF) { + break; + } - fn pos_field(p: &mut Parser) { let pos_field = p.start(); visibility(p); types::type_ref(p); pos_field.complete(p, POS_FIELD); + + if !p.at(R_PAREN) { + p.expect(COMMA); + } } + p.expect(R_PAREN); } fn generic_parameters(_: &mut Parser) {} -- cgit v1.2.3