From 18b333473804756214509e4d5143415a7f3332ee Mon Sep 17 00:00:00 2001 From: AnotherTest Date: Thu, 8 Apr 2021 12:27:12 +0430 Subject: [PATCH] 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. --- Userland/Shell/Parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Shell/Parser.cpp b/Userland/Shell/Parser.cpp index 690f353f9a..8cee85c696 100644 --- a/Userland/Shell/Parser.cpp +++ b/Userland/Shell/Parser.cpp @@ -371,7 +371,7 @@ RefPtr 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 syntax_error;