Skip to content

Commit

Permalink
refactor: rename the function rule to function_expression to avoi…
Browse files Browse the repository at this point in the history
…d collision with the `function` literal
  • Loading branch information
amaanq committed Jan 31, 2024
1 parent f1e5a09 commit 84c57ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ module.exports = grammar({
$.import,
$.object,
$.array,
$.function,
$.function_expression,
$.arrow_function,
$.generator_function,
$.class,
Expand Down Expand Up @@ -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)),
Expand Down

0 comments on commit 84c57ee

Please sign in to comment.