diff options
author | John Hodge <tpg@ucc.asn.au> | 2017-07-16 13:27:31 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2017-07-16 13:27:31 +0800 |
commit | 97567dbbd8c3f8719dbb9e32c6d0f3a155246508 (patch) | |
tree | 3268a7f2bcadd013199883b7bbc2f26b9c385643 /src/parse | |
parent | 9d1a660045de5a3cc37315c78a3a75999fef9b9a (diff) | |
download | mrust-97567dbbd8c3f8719dbb9e32c6d0f3a155246508.tar.gz |
All - Upgrade to rustc 1.19.0 beta (2017-07-08)
Diffstat (limited to 'src/parse')
-rw-r--r-- | src/parse/root.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/parse/root.cpp b/src/parse/root.cpp index 9c045880..cdb36345 100644 --- a/src/parse/root.cpp +++ b/src/parse/root.cpp @@ -140,6 +140,12 @@ void Parse_TypeBound(TokenStream& lex, AST::GenericParams& ret, TypeRef checked_ do { + // If an item terminator is seen (end of item, start of body, list separator), return early. + //if( LOOK_AHEAD(lex) == TOK_SEMICOLON || LOOK_AHEAD(lex) == TOK_COMMA ) + //{ + // return; + //} + ::std::vector< ::std::string> hrls; if(GET_TOK(tok, lex) == TOK_LIFETIME) { ret.add_bound(AST::GenericBound::make_TypeLifetime( { @@ -625,6 +631,9 @@ AST::Trait Parse_TraitDef(TokenStream& lex, const AST::MetaItems& meta_items) // TODO: Need a better way of indiciating 'static than just an invalid path supertraits.push_back( make_spanned( Span(tok.get_pos()), AST::Path() ) ); } + else if( tok.type() == TOK_BRACE_OPEN ) { + break; + } else { PUTBACK(tok, lex); supertraits.push_back( GET_SPANNED(::AST::Path, lex, Parse_Path(lex, PATH_GENERIC_TYPE)) ); |