From ba518943ce1ee8cbdbb31aa803142393a74af0ba Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sat, 22 Oct 2016 10:10:21 +0800 Subject: Parse - Fix deficiency in parsing lifetime bounds --- src/parse/root.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/parse/root.cpp b/src/parse/root.cpp index dbb079d7..4af5c147 100644 --- a/src/parse/root.cpp +++ b/src/parse/root.cpp @@ -178,9 +178,12 @@ void Parse_WhereClause(TokenStream& lex, AST::GenericParams& params) { auto lhs = mv$(tok.str()); GET_CHECK_TOK(tok, lex, TOK_COLON); - GET_CHECK_TOK(tok, lex, TOK_LIFETIME); - auto rhs = mv$(tok.str()); - params.add_bound( AST::GenericBound::make_Lifetime({lhs, rhs}) ); + do { + GET_CHECK_TOK(tok, lex, TOK_LIFETIME); + auto rhs = mv$(tok.str()); + params.add_bound( AST::GenericBound::make_Lifetime({lhs, rhs}) ); + } while( GET_TOK(tok, lex) == TOK_PLUS ); + PUTBACK(tok, lex); } // Higher-ranked types/lifetimes else if( tok.type() == TOK_RWORD_FOR ) -- cgit v1.2.3