1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 00:27:43 +00:00

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:
AnotherTest 2021-04-08 12:27:12 +04:30 committed by Andreas Kling
parent 6c3e0cc98a
commit 18b3334738

View file

@ -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;