Shell: Allow newlines between the function decl and its body
All other control structures are fine with this, so let's keep the behaviour consistent.
This commit is contained in:
parent
6c3e0cc98a
commit
18b3334738
Notes:
sideshowbarker
2024-07-18 20:39:12 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/18b33347380 Pull-request: https://github.com/SerenityOS/serenity/pull/6191
1 changed files with 1 additions and 1 deletions
|
@ -371,7 +371,7 @@ RefPtr<AST::Node> Parser::parse_function_decl()
|
|||
arguments.append({ arg_name, { name_offset, m_offset, start_line, line() } });
|
||||
}
|
||||
|
||||
consume_while(is_whitespace);
|
||||
consume_while(is_any_of("\n\t "));
|
||||
|
||||
{
|
||||
RefPtr<AST::Node> syntax_error;
|
||||
|
|
Loading…
Add table
Reference in a new issue