Parse function definitions more strictly
This commit is contained in:
parent
8ca2ecd52d
commit
7e73a575e9
|
@ -123,9 +123,10 @@ module.exports = grammar({
|
||||||
),
|
),
|
||||||
|
|
||||||
function_definition: $ => seq(
|
function_definition: $ => seq(
|
||||||
optional('function'),
|
choice(
|
||||||
$.word,
|
seq('function', $.word, optional(seq('(', ')'))),
|
||||||
optional(seq('(', ')')),
|
seq($.word, '(', ')')
|
||||||
|
),
|
||||||
$.compound_statement,
|
$.compound_statement,
|
||||||
optional($.file_redirect)
|
optional($.file_redirect)
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in New Issue