Skip to content

Commit

Permalink
Allow let chaining in while
Browse files Browse the repository at this point in the history
  • Loading branch information
thepowersgang committed Jul 6, 2024
1 parent 1058452 commit 6efb1b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parse/expr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ std::vector<AST::IfLet_Condition> Parse_IfLetChain(TokenStream& lex)
/// While loop (either as a statement, or as part of an expression)
ExprNodeP Parse_WhileStmt(TokenStream& lex, Ident lifetime)
{
if( lex.lookahead(0) == TOK_RWORD_LET ) {
if( TARGETVER_LEAST_1_74 || lex.lookahead(0) == TOK_RWORD_LET ) {
// TODO: Pattern list (same as match)?
auto conditions = Parse_IfLetChain(lex);
return NEWNODE( AST::ExprNode_WhileLet, lifetime, ::std::move(conditions), Parse_ExprBlockNode(lex) );
Expand Down

0 comments on commit 6efb1b9

Please sign in to comment.