Skip to content

Commit b83d7eb

Browse files
zweimachEmilios1995
authored andcommitted
feat: dynamic module import
1 parent c85307e commit b83d7eb

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

grammar.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ module.exports = grammar({
174174
)),
175175
optional(seq(
176176
'=',
177+
optional('await'),
177178
field('definition', $._module_definition),
178179
)),
179180
)),

test/corpus/modules.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,3 +746,18 @@ module M = (Na: N, Nb: N): (
746746
(type_identifier)
747747
(type_identifier)))))
748748
body: (block)))))
749+
750+
================================================================================
751+
Dynamic imports
752+
================================================================================
753+
754+
module LazyUtils: UtilsType = await Utils
755+
756+
--------------------------------------------------------------------------------
757+
758+
(source_file
759+
(module_declaration
760+
(module_binding
761+
(module_identifier)
762+
(module_identifier)
763+
(module_identifier))))

0 commit comments

Comments
 (0)