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

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

Issue 15934003: Remove checks for Expect and ExpectException from (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 6
7 #include "lib/invocation_mirror.h" 7 #include "lib/invocation_mirror.h"
8 #include "vm/bigint_operations.h" 8 #include "vm/bigint_operations.h"
9 #include "vm/class_finalizer.h" 9 #include "vm/class_finalizer.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 8335 matching lines...) Expand 10 before | Expand all | Expand 10 after
8346 String& first_lib_url = String::Handle(); 8346 String& first_lib_url = String::Handle();
8347 Namespace& import = Namespace::Handle(); 8347 Namespace& import = Namespace::Handle();
8348 intptr_t num_imports = library_.num_imports(); 8348 intptr_t num_imports = library_.num_imports();
8349 Object& imported_obj = Object::Handle(); 8349 Object& imported_obj = Object::Handle();
8350 Library& lib = Library::Handle(); 8350 Library& lib = Library::Handle();
8351 for (int i = 0; i < num_imports; i++) { 8351 for (int i = 0; i < num_imports; i++) {
8352 import = library_.ImportAt(i); 8352 import = library_.ImportAt(i);
8353 imported_obj = LookupNameInImport(import, name); 8353 imported_obj = LookupNameInImport(import, name);
8354 if (!imported_obj.IsNull()) { 8354 if (!imported_obj.IsNull()) {
8355 lib ^= import.library(); 8355 lib ^= import.library();
8356 // TODO(8474): Remove the "Expect" special casing. 8356 if (!first_lib_url.IsNull()) {
8357 if (!first_lib_url.IsNull()
8358 && (strcmp(name.ToCString(), "Expect") != 0)
8359 && (strcmp(name.ToCString(), "ExpectException") != 0)) {
8360 // Found duplicate definition. 8357 // Found duplicate definition.
8361 Error& ambiguous_ref_error = Error::Handle(); 8358 Error& ambiguous_ref_error = Error::Handle();
8362 if (first_lib_url.raw() == lib.url()) { 8359 if (first_lib_url.raw() == lib.url()) {
8363 ambiguous_ref_error = FormatErrorMsg( 8360 ambiguous_ref_error = FormatErrorMsg(
8364 script_, ident_pos, "Error", 8361 script_, ident_pos, "Error",
8365 "ambiguous reference: " 8362 "ambiguous reference: "
8366 "'%s' as library '%s' is imported multiple times", 8363 "'%s' as library '%s' is imported multiple times",
8367 name.ToCString(), 8364 name.ToCString(),
8368 first_lib_url.ToCString()); 8365 first_lib_url.ToCString());
8369 } else { 8366 } else {
(...skipping 1586 matching lines...) Expand 10 before | Expand all | Expand 10 after
9956 void Parser::SkipQualIdent() { 9953 void Parser::SkipQualIdent() {
9957 ASSERT(IsIdentifier()); 9954 ASSERT(IsIdentifier());
9958 ConsumeToken(); 9955 ConsumeToken();
9959 if (CurrentToken() == Token::kPERIOD) { 9956 if (CurrentToken() == Token::kPERIOD) {
9960 ConsumeToken(); // Consume the kPERIOD token. 9957 ConsumeToken(); // Consume the kPERIOD token.
9961 ExpectIdentifier("identifier expected after '.'"); 9958 ExpectIdentifier("identifier expected after '.'");
9962 } 9959 }
9963 } 9960 }
9964 9961
9965 } // namespace dart 9962 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698