mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 00:25:12 +00:00
Shell: Do not treat the ending newline as part of a comment
This allows the parser to finally parse the entire source into a single AST. As a result of allowing comments inside sequences, Sequence is also marked as would_execute if its left or right node would.
This commit is contained in:
committed by
Andreas Kling
parent
6d17fe38a4
commit
f9d3055691
@@ -717,9 +717,6 @@ RefPtr<AST::Node> Parser::parse_comment()
|
||||
|
||||
consume();
|
||||
auto text = consume_while(is_not('\n'));
|
||||
if (peek() == '\n')
|
||||
consume();
|
||||
|
||||
return create<AST::Comment>(move(text)); // Comment
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user