Index: src/parsing/parser.h |
diff --git a/src/parsing/parser.h b/src/parsing/parser.h |
index 35711b068f92b59adc3527e61cd3936692bb8a0c..07e2a356a356c03ef09122280c0e3754a9aa25aa 100644 |
--- a/src/parsing/parser.h |
+++ b/src/parsing/parser.h |
@@ -765,14 +765,24 @@ class Parser : public ParserBase<ParserTraits> { |
void* ParseModuleItemList(ZoneList<Statement*>* body, bool* ok); |
Statement* ParseModuleItem(bool* ok); |
const AstRawString* ParseModuleSpecifier(bool* ok); |
- Statement* ParseImportDeclaration(bool* ok); |
+ void* ParseImportDeclaration(bool* ok); |
Statement* ParseExportDeclaration(bool* ok); |
Statement* ParseExportDefault(bool* ok); |
void* ParseExportClause(ZoneList<const AstRawString*>* export_names, |
ZoneList<Scanner::Location>* export_locations, |
ZoneList<const AstRawString*>* local_names, |
Scanner::Location* reserved_loc, bool* ok); |
- ZoneList<ImportDeclaration*>* ParseNamedImports(int pos, bool* ok); |
+ struct NamedImport { |
+ const AstRawString* import_name; |
+ const AstRawString* local_name; |
+ const Scanner::Location location; |
+ NamedImport(const AstRawString* import_name, const AstRawString* local_name, |
+ const Scanner::Location location) |
adamk
2016/07/13 18:38:22
No need for "const" here.
neis
2016/07/14 10:28:24
Done.
|
+ : import_name(import_name), |
+ local_name(local_name), |
+ location(location) {} |
+ }; |
+ ZoneList<const NamedImport*>* ParseNamedImports(int pos, bool* ok); |
Statement* ParseStatement(ZoneList<const AstRawString*>* labels, |
AllowLabelledFunctionStatement allow_function, |
bool* ok); |
@@ -1025,6 +1035,7 @@ class Parser : public ParserBase<ParserTraits> { |
Variable* Declare(Declaration* declaration, |
DeclarationDescriptor::Kind declaration_kind, bool resolve, |
bool* ok, Scope* declaration_scope = nullptr); |
+ void* DeclareImport(const AstRawString* local_name, int pos, bool* ok); |
bool TargetStackContainsLabel(const AstRawString* label); |
BreakableStatement* LookupBreakTarget(const AstRawString* label, bool* ok); |