summaryrefslogtreecommitdiffstats
path: root/js/src/frontend/Parser.h
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-06-09 22:30:59 -0400
committerGaming4JC <g4jc@hyperbola.info>2019-07-18 22:38:38 -0400
commit57a8b65fc0c4bd12149855d972aea05828e4d6e7 (patch)
tree0424a2beee269c32695ae81a38106405863e6cf6 /js/src/frontend/Parser.h
parentf39640128068a3816a9bfc28d619f8fa8f161435 (diff)
downloadUXP-57a8b65fc0c4bd12149855d972aea05828e4d6e7.tar
UXP-57a8b65fc0c4bd12149855d972aea05828e4d6e7.tar.gz
UXP-57a8b65fc0c4bd12149855d972aea05828e4d6e7.tar.lz
UXP-57a8b65fc0c4bd12149855d972aea05828e4d6e7.tar.xz
UXP-57a8b65fc0c4bd12149855d972aea05828e4d6e7.zip
1339963 - Part 1: Split Parser::exportDeclaration.
Diffstat (limited to 'js/src/frontend/Parser.h')
-rw-r--r--js/src/frontend/Parser.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/js/src/frontend/Parser.h b/js/src/frontend/Parser.h
index 4eb0f5a39..e322a4b26 100644
--- a/js/src/frontend/Parser.h
+++ b/js/src/frontend/Parser.h
@@ -1193,9 +1193,26 @@ class Parser final : public ParserBase, private JS::AutoGCRooter
// continues a LexicalDeclaration.
bool nextTokenContinuesLetDeclaration(TokenKind next, YieldHandling yieldHandling);
- Node lexicalDeclaration(YieldHandling yieldHandling, bool isConst);
+ Node lexicalDeclaration(YieldHandling yieldHandling, DeclarationKind kind);
Node importDeclaration();
+
+ bool processExport(Node node);
+ bool processExportFrom(Node node);
+
+ Node exportFrom(uint32_t begin, Node specList);
+ Node exportBatch(uint32_t begin);
+ Node exportClause(uint32_t begin);
+ Node exportFunctionDeclaration(uint32_t begin);
+ Node exportVariableStatement(uint32_t begin);
+ Node exportClassDeclaration(uint32_t begin);
+ Node exportLexicalDeclaration(uint32_t begin, DeclarationKind kind);
+ Node exportDefaultFunctionDeclaration(uint32_t begin,
+ FunctionAsyncKind asyncKind = SyncFunction);
+ Node exportDefaultClassDeclaration(uint32_t begin);
+ Node exportDefaultAssignExpr(uint32_t begin);
+ Node exportDefault(uint32_t begin);
+
Node exportDeclaration();
Node expressionStatement(YieldHandling yieldHandling,
InvokedPrediction invoked = PredictUninvoked);
@@ -1327,6 +1344,10 @@ class Parser final : public ParserBase, private JS::AutoGCRooter
bool checkExportedName(JSAtom* exportName);
bool checkExportedNamesForDeclaration(Node node);
+ bool checkExportedNameForClause(Node node);
+ bool checkExportedNameForFunction(Node node);
+ bool checkExportedNameForClass(Node node);
+
enum ClassContext { ClassStatement, ClassExpression };
Node classDefinition(YieldHandling yieldHandling, ClassContext classContext,
DefaultHandling defaultHandling);