Parse function definitions more strictly
This commit is contained in:
parent
8ca2ecd52d
commit
7e73a575e9
|
@ -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)
|
||||
),
|
||||
|
|
Loading…
Reference in New Issue