Skip to content

Commit b9290a4

Browse files
committed
stop considering arrow function to be a primary expression, this helps ()=>{}() be considered an arrow function rather than a call expression at the top level at least
1 parent e7b1b60 commit b9290a4

File tree

4 files changed

+32779
-33707
lines changed

4 files changed

+32779
-33707
lines changed

grammar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,7 @@ module.exports = grammar({
490490
$.ternary_expression,
491491
$.update_expression,
492492
$.yield_expression,
493+
$.arrow_function,
493494
),
494495

495496
primary_expression: $ => choice(
@@ -511,7 +512,6 @@ module.exports = grammar({
511512
$.object,
512513
$.array,
513514
$.function_expression,
514-
$.arrow_function,
515515
$.generator_function,
516516
$.class,
517517
$.meta_property,

src/grammar.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/node-types.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)