mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-24 13:35:12 +00:00
Shell: Ignore leading semicolons
This makes things like `foo&; bar` behave as expected. Such behaviour is actually closer to the grammar defined in Parser.h anyway :P
This commit is contained in:
parent
335916d8db
commit
58308748cb
Notes:
sideshowbarker
2024-07-19 04:34:44 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/58308748cbc Pull-request: https://github.com/SerenityOS/serenity/pull/2899
1 changed files with 1 additions and 1 deletions
|
@ -144,7 +144,7 @@ RefPtr<AST::Node> Parser::parse_toplevel()
|
|||
|
||||
RefPtr<AST::Node> Parser::parse_sequence()
|
||||
{
|
||||
consume_while(is_any_of(" \t\n"));
|
||||
consume_while(is_any_of(" \t\n;")); // ignore whitespaces or terminators without effect.
|
||||
|
||||
auto rule_start = push_start();
|
||||
auto var_decls = parse_variable_decls();
|
||||
|
|
Loading…
Add table
Reference in a new issue