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

Side by Side Diff: vm/scanner.cc

Issue 9431038: Fix issue 732: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 10 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 | « vm/parser.cc ('k') | 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/thread.h" 10 #include "vm/thread.h"
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 return; 369 return;
370 } 370 }
371 if (!IsIdentStartChar(c0_)) { 371 if (!IsIdentStartChar(c0_)) {
372 ErrorMsg("Unrecognized library tag"); 372 ErrorMsg("Unrecognized library tag");
373 SkipLine(); 373 SkipLine();
374 return; 374 return;
375 } 375 }
376 const String& kLibrary = String::Handle(String::NewSymbol("library")); 376 const String& kLibrary = String::Handle(String::NewSymbol("library"));
377 const String& kImport = String::Handle(String::NewSymbol("import")); 377 const String& kImport = String::Handle(String::NewSymbol("import"));
378 const String& kSource = String::Handle(String::NewSymbol("source")); 378 const String& kSource = String::Handle(String::NewSymbol("source"));
379 const String& kResource = String::Handle(String::NewSymbol("resource"));
379 const String& ident = String::Handle(ConsumeIdentChars(false)); 380 const String& ident = String::Handle(ConsumeIdentChars(false));
380 if (ident.Equals(kLibrary)) { 381 if (ident.Equals(kLibrary)) {
381 current_token_.kind = Token::kLIBRARY; 382 current_token_.kind = Token::kLIBRARY;
382 return; 383 return;
383 } 384 }
384 if (ident.Equals(kImport)) { 385 if (ident.Equals(kImport)) {
385 current_token_.kind = Token::kIMPORT; 386 current_token_.kind = Token::kIMPORT;
386 return; 387 return;
387 } 388 }
388 if (ident.Equals(kSource)) { 389 if (ident.Equals(kSource)) {
389 current_token_.kind = Token::kSOURCE; 390 current_token_.kind = Token::kSOURCE;
390 return; 391 return;
391 } 392 }
393 if (ident.Equals(kResource)) {
394 current_token_.kind = Token::kRESOURCE;
395 return;
396 }
392 ErrorMsg("Unrecognized library token"); 397 ErrorMsg("Unrecognized library token");
393 SkipLine(); 398 SkipLine();
394 } 399 }
395 400
396 401
397 void Scanner::ScanLiteralString(bool is_raw) { 402 void Scanner::ScanLiteralString(bool is_raw) {
398 ASSERT(!IsScanningString()); 403 ASSERT(!IsScanningString());
399 ASSERT(c0_ == '"' || c0_ == '\''); 404 ASSERT(c0_ == '"' || c0_ == '\'');
400 405
401 // Entering string scanning mode. 406 // Entering string scanning mode.
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 "%c%"PRIxPTR, kPrivateKeySeparator, key_value); 896 "%c%"PRIxPTR, kPrivateKeySeparator, key_value);
892 const String& result = String::Handle(String::New(private_key)); 897 const String& result = String::Handle(String::New(private_key));
893 return result.raw(); 898 return result.raw();
894 } 899 }
895 900
896 901
897 void Scanner::InitOnce() { 902 void Scanner::InitOnce() {
898 } 903 }
899 904
900 } // namespace dart 905 } // namespace dart
OLDNEW
« no previous file with comments | « vm/parser.cc ('k') | vm/token.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698