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

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

Issue 11293054: Revert cl 14446 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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 | « runtime/vm/parser.cc ('k') | runtime/vm/token.h » ('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/scanner.h" 5 #include "vm/scanner.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/flags.h" 8 #include "vm/flags.h"
9 #include "vm/object.h" 9 #include "vm/object.h"
10 #include "vm/object_store.h" 10 #include "vm/object_store.h"
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 if (!IsLetter(c0_)) { 390 if (!IsLetter(c0_)) {
391 ErrorMsg("Unrecognized library tag"); 391 ErrorMsg("Unrecognized library tag");
392 SkipLine(); 392 SkipLine();
393 return; 393 return;
394 } 394 }
395 const String& kLibrary = String::Handle(Symbols::Library()); 395 const String& kLibrary = String::Handle(Symbols::Library());
396 const String& kImport = String::Handle(Symbols::Import()); 396 const String& kImport = String::Handle(Symbols::Import());
397 const String& kSource = String::Handle(Symbols::Source()); 397 const String& kSource = String::Handle(Symbols::Source());
398 const String& ident = String::Handle(ConsumeIdentChars(false)); 398 const String& ident = String::Handle(ConsumeIdentChars(false));
399 if (ident.Equals(kLibrary)) { 399 if (ident.Equals(kLibrary)) {
400 current_token_.kind = Token::kLEGACY_LIBRARY; 400 current_token_.kind = Token::kLIBRARY;
401 return; 401 return;
402 } 402 }
403 if (ident.Equals(kImport)) { 403 if (ident.Equals(kImport)) {
404 current_token_.kind = Token::kLEGACY_IMPORT; 404 current_token_.kind = Token::kIMPORT;
405 return; 405 return;
406 } 406 }
407 if (ident.Equals(kSource)) { 407 if (ident.Equals(kSource)) {
408 current_token_.kind = Token::kLEGACY_SOURCE; 408 current_token_.kind = Token::kSOURCE;
409 return; 409 return;
410 } 410 }
411 ErrorMsg("Unrecognized library token"); 411 ErrorMsg("Unrecognized library token");
412 SkipLine(); 412 SkipLine();
413 } 413 }
414 414
415 415
416 void Scanner::ScanLiteralString(bool is_raw) { 416 void Scanner::ScanLiteralString(bool is_raw) {
417 ASSERT(!IsScanningString()); 417 ASSERT(!IsScanningString());
418 ASSERT(c0_ == '"' || c0_ == '\''); 418 ASSERT(c0_ == '"' || c0_ == '\'');
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
949 "%c%#"Px"", kPrivateKeySeparator, key_value); 949 "%c%#"Px"", kPrivateKeySeparator, key_value);
950 const String& result = String::Handle(String::New(private_key, Heap::kOld)); 950 const String& result = String::Handle(String::New(private_key, Heap::kOld));
951 return result.raw(); 951 return result.raw();
952 } 952 }
953 953
954 954
955 void Scanner::InitOnce() { 955 void Scanner::InitOnce() {
956 } 956 }
957 957
958 } // namespace dart 958 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/token.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698