refactor: rename the `function` rule to `function_expression` to avoid collision with the `function` literal

pull/643/head
Amaan Qureshi 2024-01-31 00:41:22 +07:00
parent f1e5a09b8d
commit 84c57eeb0e
1 changed files with 2 additions and 2 deletions

@ -497,7 +497,7 @@ module.exports = grammar({
$.import,
$.object,
$.array,
$.function,
$.function_expression,
$.arrow_function,
$.generator_function,
$.class,
@ -701,7 +701,7 @@ module.exports = grammar({
class_heritage: $ => seq('extends', $.expression),
function: $ => prec('literal', seq(
function_expression: $ => prec('literal', seq(
optional('async'),
'function',
field('name', optional($.identifier)),