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 #include "src/parsing/parser.h" | 5 #include "src/parsing/parser.h" |
6 | 6 |
7 #include "src/api.h" | 7 #include "src/api.h" |
8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
9 #include "src/ast/ast-expression-rewriter.h" | 9 #include "src/ast/ast-expression-rewriter.h" |
10 #include "src/ast/ast-expression-visitor.h" | 10 #include "src/ast/ast-expression-visitor.h" |
(...skipping 1329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1340 // TODO(adamk): Pass both local_name and export_name once ParserTraits | 1340 // TODO(adamk): Pass both local_name and export_name once ParserTraits |
1341 // supports multiple arg error messages. | 1341 // supports multiple arg error messages. |
1342 // Also try to report this at a better location. | 1342 // Also try to report this at a better location. |
1343 ParserTraits::ReportMessage(MessageTemplate::kModuleExportUndefined, | 1343 ParserTraits::ReportMessage(MessageTemplate::kModuleExportUndefined, |
1344 it.local_name()); | 1344 it.local_name()); |
1345 *ok = false; | 1345 *ok = false; |
1346 return NULL; | 1346 return NULL; |
1347 } | 1347 } |
1348 } | 1348 } |
1349 | 1349 |
1350 scope_->module()->Freeze(); | |
1351 return NULL; | 1350 return NULL; |
1352 } | 1351 } |
1353 | 1352 |
1354 | 1353 |
1355 const AstRawString* Parser::ParseModuleSpecifier(bool* ok) { | 1354 const AstRawString* Parser::ParseModuleSpecifier(bool* ok) { |
1356 // ModuleSpecifier : | 1355 // ModuleSpecifier : |
1357 // StringLiteral | 1356 // StringLiteral |
1358 | 1357 |
1359 Expect(Token::STRING, CHECK_OK); | 1358 Expect(Token::STRING, CHECK_OK); |
1360 return GetSymbol(scanner()); | 1359 return GetSymbol(scanner()); |
(...skipping 4376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5737 auto class_literal = value->AsClassLiteral(); | 5736 auto class_literal = value->AsClassLiteral(); |
5738 if (class_literal->raw_name() == nullptr) { | 5737 if (class_literal->raw_name() == nullptr) { |
5739 class_literal->set_raw_name(name); | 5738 class_literal->set_raw_name(name); |
5740 } | 5739 } |
5741 } | 5740 } |
5742 } | 5741 } |
5743 | 5742 |
5744 | 5743 |
5745 } // namespace internal | 5744 } // namespace internal |
5746 } // namespace v8 | 5745 } // namespace v8 |
OLD | NEW |