From 6b5241dbd3e46bf78a051b59226bb57bffe5473f Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sat, 19 Nov 2016 18:39:40 +0800 Subject: Parse - Fix error in parsing unions --- src/parse/root.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/parse/root.cpp b/src/parse/root.cpp index a6683925..13009014 100644 --- a/src/parse/root.cpp +++ b/src/parse/root.cpp @@ -875,11 +875,11 @@ AST::Enum Parse_EnumDef(TokenStream& lex, const AST::MetaItems& meta_items) } AST::MetaItems item_attrs; - while( tok.type() == TOK_ATTR_OPEN ) + while( LOOK_AHEAD(lex) == TOK_ATTR_OPEN ) { + GET_TOK(tok, lex); item_attrs.push_back( Parse_MetaItem(lex) ); GET_CHECK_TOK(tok, lex, TOK_SQUARE_CLOSE); - GET_TOK(tok, lex); } SET_ATTRS(lex, item_attrs); -- cgit v1.2.3