diff options
author | John Hodge <tpg@mutabah.net> | 2016-11-19 18:39:40 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-11-19 18:39:40 +0800 |
commit | 6b5241dbd3e46bf78a051b59226bb57bffe5473f (patch) | |
tree | 206c82abf0500f833afbc629099200a9f99218f1 /src | |
parent | f3ca4c8f8dd025649058a6c2795807d1d92a3f01 (diff) | |
download | mrust-6b5241dbd3e46bf78a051b59226bb57bffe5473f.tar.gz |
Parse - Fix error in parsing unions
Diffstat (limited to 'src')
-rw-r--r-- | src/parse/root.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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);
|