Make the unambiguous grammar select module when import.meta is used.

This commit is contained in:
Logan Smyth
2018-03-09 14:44:06 -08:00
parent 958551fd89
commit 3c8e9acd4a
4 changed files with 172 additions and 0 deletions

View File

@@ -957,6 +957,8 @@ export default class ExpressionParser extends LValParser {
{ code: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED" },
);
}
this.sawUnambiguousESM = true;
return this.parseMetaProperty(node, id, "meta");
}