@@ -104,12 +104,19 @@ contexts:
104
104
scope : punctuation.separator.comma.js
105
105
106
106
import-export :
107
- - match : import{{identifier_break}}
107
+ - match : import{{identifier_break}}(?!\s*\.)
108
108
scope : keyword.control.import-export.js
109
109
set :
110
- - import-meta
111
- - expect-semicolon
112
- - import-string-or-items
110
+ - meta_scope : meta.import.js
111
+ - match : (?=\.) # Recovery for import.meta
112
+ set :
113
+ - expression-statement-end
114
+ - import-meta-expression-dot
115
+ - match : (?=\S)
116
+ set :
117
+ - import-meta
118
+ - expect-semicolon
119
+ - import-string-or-items
113
120
114
121
- match : export{{identifier_break}}
115
122
scope : keyword.control.import-export.js
@@ -748,6 +755,7 @@ contexts:
748
755
- include : prefix-operators
749
756
- include : yield-expression
750
757
- include : await-expression
758
+ - include : import-meta-expression
751
759
752
760
- include : class
753
761
- include : constants
@@ -1899,3 +1907,18 @@ contexts:
1899
1907
scope : invalid.illegal.illegal-identifier.js
1900
1908
pop : true
1901
1909
- include : else-pop
1910
+
1911
+ import-meta-expression :
1912
+ - match : import{{identifier_break}}
1913
+ scope : variable.language.import.js
1914
+ set : import-meta-expression-dot
1915
+
1916
+ import-meta-expression-dot :
1917
+ - match : \.
1918
+ scope : punctuation.accessor.js
1919
+ set :
1920
+ - match : meta{{identifier_break}}
1921
+ scope : variable.language.import.js
1922
+ pop : true
1923
+ - include : object-property
1924
+ - include : else-pop
0 commit comments