OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_AST_MODULES_H_ | 5 #ifndef V8_AST_MODULES_H_ |
6 #define V8_AST_MODULES_H_ | 6 #define V8_AST_MODULES_H_ |
7 | 7 |
8 #include "src/parsing/scanner.h" // Only for Scanner::Location. | 8 #include "src/parsing/scanner.h" // Only for Scanner::Location. |
9 #include "src/pending-compilation-error-handler.h" | 9 #include "src/pending-compilation-error-handler.h" |
10 #include "src/zone-containers.h" | 10 #include "src/zone-containers.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 const AstRawString* module_request, const Scanner::Location loc, | 57 const AstRawString* module_request, const Scanner::Location loc, |
58 Zone* zone); | 58 Zone* zone); |
59 | 59 |
60 // export * from "foo.js"; | 60 // export * from "foo.js"; |
61 void AddStarExport( | 61 void AddStarExport( |
62 const AstRawString* module_request, const Scanner::Location loc, | 62 const AstRawString* module_request, const Scanner::Location loc, |
63 Zone* zone); | 63 Zone* zone); |
64 | 64 |
65 // Check if module is well-formed and report error if not. | 65 // Check if module is well-formed and report error if not. |
66 // Also canonicalize indirect exports. | 66 // Also canonicalize indirect exports. |
67 bool Validate(DeclarationScope* module_scope, | 67 bool Validate(ModuleScope* module_scope, |
68 PendingCompilationErrorHandler* error_handler, Zone* zone); | 68 PendingCompilationErrorHandler* error_handler, Zone* zone); |
69 | 69 |
70 struct ModuleEntry : public ZoneObject { | 70 struct ModuleEntry : public ZoneObject { |
71 const Scanner::Location location; | 71 const Scanner::Location location; |
72 const AstRawString* export_name; | 72 const AstRawString* export_name; |
73 const AstRawString* local_name; | 73 const AstRawString* local_name; |
74 const AstRawString* import_name; | 74 const AstRawString* import_name; |
75 const AstRawString* module_request; | 75 const AstRawString* module_request; |
76 | 76 |
77 explicit ModuleEntry(Scanner::Location loc) | 77 explicit ModuleEntry(Scanner::Location loc) |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 // into: | 116 // into: |
117 // import {a as b} from "X"; export {a as c} from "X"; | 117 // import {a as b} from "X"; export {a as c} from "X"; |
118 // (The import entry is never deleted.) | 118 // (The import entry is never deleted.) |
119 void MakeIndirectExportsExplicit(); | 119 void MakeIndirectExportsExplicit(); |
120 }; | 120 }; |
121 | 121 |
122 } // namespace internal | 122 } // namespace internal |
123 } // namespace v8 | 123 } // namespace v8 |
124 | 124 |
125 #endif // V8_AST_MODULES_H_ | 125 #endif // V8_AST_MODULES_H_ |
OLD | NEW |