diff --git a/grammar.js b/grammar.js index c6b132c..04df5a6 100644 --- a/grammar.js +++ b/grammar.js @@ -123,9 +123,10 @@ module.exports = grammar({ ), function_definition: $ => seq( - optional('function'), - $.word, - optional(seq('(', ')')), + choice( + seq('function', $.word, optional(seq('(', ')'))), + seq($.word, '(', ')') + ), $.compound_statement, optional($.file_redirect) ),