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
Notes: sideshowbarker 2024-07-18 20:39:12 +09:00

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;