Skip to content

Commit

Permalink
fix: add import.meta to meta_property
Browse files Browse the repository at this point in the history
  • Loading branch information
jackschu authored Jul 20, 2024
1 parent d767b1a commit b1fd0b2
Show file tree
Hide file tree
Showing 5 changed files with 40,696 additions and 40,604 deletions.
3 changes: 2 additions & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ module.exports = grammar({
['member', 'new', 'call', $.expression],
['declaration', 'literal'],
[$.primary_expression, $.statement_block, 'object'],
[$.meta_property, $.import],
[$.import_statement, $.import],
[$.export_statement, $.primary_expression],
[$.lexical_declaration, $.primary_expression],
Expand Down Expand Up @@ -1100,7 +1101,7 @@ module.exports = grammar({
return token(seq('#', alpha, repeat(alphanumeric)));
},

meta_property: _ => seq('new', '.', 'target'),
meta_property: _ => choice(seq('new', '.', 'target'), seq('import', '.', 'meta')),

this: _ => 'this',
super: _ => 'super',
Expand Down
50 changes: 41 additions & 9 deletions src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src/node-types.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b1fd0b2

Please sign in to comment.