1339963 - Part 3: Check IdentifierName in ExportClause without from.

This commit is contained in:
Gaming4JC 2019-06-09 22:35:15 -04:00 • committed by Roy Tam
commit 9b7c6181e6
3 changed files with 77 additions and 2 deletions

View file

@ -1202,6 +1202,7 @@ class Parser final : public ParserBase, private JS::AutoGCRooter
Node exportFrom(uint32_t begin, Node specList);
Node exportBatch(uint32_t begin);
bool checkLocalExportNames(Node node);
Node exportClause(uint32_t begin);
Node exportFunctionDeclaration(uint32_t begin);
Node exportVariableStatement(uint32_t begin);
@ -1356,6 +1357,10 @@ class Parser final : public ParserBase, private JS::AutoGCRooter
uint32_t offset,
YieldHandling yieldHandling);
bool checkLocalExportName(HandlePropertyName ident, uint32_t offset) {
return checkLabelOrIdentifierReference(ident, offset, YieldIsName);
}
bool checkBindingIdentifier(HandlePropertyName ident,
uint32_t offset,
YieldHandling yieldHandling);