mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +00:00
Shell: Fix parse mistake in '&&' not being recursive
This commit is contained in:
committed by
Andreas Kling
parent
4be2cb895c
commit
c4888f4b5f
@@ -301,11 +301,11 @@ RefPtr<AST::Node> Parser::parse_and_logical_sequence()
|
||||
return pipe_sequence;
|
||||
}
|
||||
|
||||
auto right_pipe_sequence = parse_pipe_sequence();
|
||||
if (!right_pipe_sequence)
|
||||
right_pipe_sequence = create<AST::SyntaxError>("Expected an expression after '&&'");
|
||||
auto right_and_sequence = parse_and_logical_sequence();
|
||||
if (!right_and_sequence)
|
||||
right_and_sequence = create<AST::SyntaxError>("Expected an expression after '&&'");
|
||||
|
||||
return create<AST::And>(create<AST::Execute>(move(pipe_sequence)), create<AST::Execute>(move(right_pipe_sequence)));
|
||||
return create<AST::And>(create<AST::Execute>(move(pipe_sequence)), create<AST::Execute>(move(right_and_sequence)));
|
||||
}
|
||||
|
||||
RefPtr<AST::Node> Parser::parse_pipe_sequence()
|
||||
|
||||
Reference in New Issue
Block a user