@babel/parser
Advanced tools
Comparing version 7.9.0 to 7.9.2
@@ -1559,10 +1559,15 @@ "use strict"; | ||
parseImport(node) { | ||
if (this.match(_types.types.name) && this.lookahead().type === _types.types.eq) { | ||
return this.tsParseImportEqualsDeclaration(node); | ||
} | ||
if (this.match(_types.types.name) || this.match(_types.types.star) || this.match(_types.types.braceL)) { | ||
const ahead = this.lookahead(); | ||
if (this.eatContextual("type")) { | ||
node.importKind = "type"; | ||
} else { | ||
node.importKind = "value"; | ||
if (this.match(_types.types.name) && ahead.type === _types.types.eq) { | ||
return this.tsParseImportEqualsDeclaration(node); | ||
} | ||
if (this.isContextual("type") && ahead.type !== _types.types.comma && !(ahead.type === _types.types.name && ahead.value === "from")) { | ||
node.importKind = "type"; | ||
this.next(); | ||
} else { | ||
node.importKind = "value"; | ||
} | ||
} | ||
@@ -1569,0 +1574,0 @@ |
{ | ||
"name": "@babel/parser", | ||
"version": "7.9.0", | ||
"version": "7.9.2", | ||
"description": "A JavaScript parser", | ||
@@ -39,3 +39,3 @@ "author": "Sebastian McKenzie <sebmck@gmail.com>", | ||
}, | ||
"gitHead": "8d5e422be27251cfaadf8dd2536b31b4a5024b02" | ||
"gitHead": "2399e0df23cbd574a5ab39822288c438f5380ae8" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1845137
21285