rra/ilgonmic/js-fun-import
[JS IR] Test import.meta syntax [JS IR] Add possibility to use import.meta [JS IR] Check if import function-like returns Promise [JS IR] Add test with import function syntax [JS IR] Allow import function-like in js function Merge-request: KT-MR-5948 Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com> ^KT-51125 fixed
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Contributor(s):
|
||||
* Mike Ang
|
||||
* Mike McCabe
|
||||
*
|
||||
@@ -1140,6 +1140,13 @@ public class Parser {
|
||||
mustMatchToken(ts, TokenStream.GWT, "msg.no.paren");
|
||||
return pn;
|
||||
|
||||
case TokenStream.IMPORT:
|
||||
// for import() and import.meta syntax
|
||||
if (ts.peekToken() != TokenStream.LP && ts.peekToken() != TokenStream.DOT) {
|
||||
reportError(ts, "msg.syntax");
|
||||
}
|
||||
return nf.createName(TokenStream.tokenToName(TokenStream.IMPORT), position);
|
||||
|
||||
case TokenStream.NAME:
|
||||
String name = ts.getString();
|
||||
return nf.createName(name, position);
|
||||
|
||||
Reference in New Issue
Block a user