Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1243)

Side by Side Diff: runtime/vm/parser.cc

Issue 2640853005: Make Analyzer, VM and dart2js accept URI strings as part-of library identifier. (Closed)
Patch Set: Status fixes Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/compiler/lib/src/elements/modelx.dart ('k') | tests/language/language_kernel.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/parser.h" 5 #include "vm/parser.h"
6 #include "vm/flags.h" 6 #include "vm/flags.h"
7 7
8 #ifndef DART_PRECOMPILED_RUNTIME 8 #ifndef DART_PRECOMPILED_RUNTIME
9 9
10 #include "lib/invocation_mirror.h" 10 #include "lib/invocation_mirror.h"
(...skipping 6391 matching lines...) Expand 10 before | Expand all | Expand 10 after
6402 6402
6403 6403
6404 void Parser::ParsePartHeader() { 6404 void Parser::ParsePartHeader() {
6405 SkipMetadata(); 6405 SkipMetadata();
6406 CheckToken(Token::kPART, "'part of' expected"); 6406 CheckToken(Token::kPART, "'part of' expected");
6407 ConsumeToken(); 6407 ConsumeToken();
6408 if (!IsSymbol(Symbols::Of())) { 6408 if (!IsSymbol(Symbols::Of())) {
6409 ReportError("'part of' expected"); 6409 ReportError("'part of' expected");
6410 } 6410 }
6411 ConsumeToken(); 6411 ConsumeToken();
6412 // The VM is not required to check that the library name matches the 6412 // The VM is not required to check that the library name or URI matches the
6413 // name of the current library, so we ignore it. 6413 // name or URI of the current library, so we ignore them.
6414 ExpectIdentifier("library name expected"); 6414 if (CurrentToken() == Token::kSTRING) {
6415 while (CurrentToken() == Token::kPERIOD) { 6415 ParseStringLiteral(false);
6416 ConsumeToken(); 6416 } else {
6417 ExpectIdentifier("malformed library name"); 6417 ExpectIdentifier("library name expected");
6418 while (CurrentToken() == Token::kPERIOD) {
6419 ConsumeToken();
6420 ExpectIdentifier("malformed library name");
6421 }
6418 } 6422 }
6419 ExpectSemicolon(); 6423 ExpectSemicolon();
6420 } 6424 }
6421 6425
6422 6426
6423 void Parser::ParseTopLevel() { 6427 void Parser::ParseTopLevel() {
6424 TRACE_PARSER("ParseTopLevel"); 6428 TRACE_PARSER("ParseTopLevel");
6425 // Collect the classes found at the top level in this growable array. 6429 // Collect the classes found at the top level in this growable array.
6426 // They need to be registered with class finalization after parsing 6430 // They need to be registered with class finalization after parsing
6427 // has been completed. 6431 // has been completed.
(...skipping 8774 matching lines...) Expand 10 before | Expand all | Expand 10 after
15202 const ArgumentListNode& function_args, 15206 const ArgumentListNode& function_args,
15203 const LocalVariable* temp_for_last_arg, 15207 const LocalVariable* temp_for_last_arg,
15204 bool is_super_invocation) { 15208 bool is_super_invocation) {
15205 UNREACHABLE(); 15209 UNREACHABLE();
15206 return NULL; 15210 return NULL;
15207 } 15211 }
15208 15212
15209 } // namespace dart 15213 } // namespace dart
15210 15214
15211 #endif // DART_PRECOMPILED_RUNTIME 15215 #endif // DART_PRECOMPILED_RUNTIME
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/elements/modelx.dart ('k') | tests/language/language_kernel.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698