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

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

Issue 10918226: Get rid of #resource directive in VM (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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 | « runtime/vm/parser.cc ('k') | runtime/vm/symbols.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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 return; 388 return;
389 } 389 }
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& kResource = String::Handle(Symbols::Resource());
399 const String& ident = String::Handle(ConsumeIdentChars(false)); 398 const String& ident = String::Handle(ConsumeIdentChars(false));
400 if (ident.Equals(kLibrary)) { 399 if (ident.Equals(kLibrary)) {
401 current_token_.kind = Token::kLIBRARY; 400 current_token_.kind = Token::kLIBRARY;
402 return; 401 return;
403 } 402 }
404 if (ident.Equals(kImport)) { 403 if (ident.Equals(kImport)) {
405 current_token_.kind = Token::kIMPORT; 404 current_token_.kind = Token::kIMPORT;
406 return; 405 return;
407 } 406 }
408 if (ident.Equals(kSource)) { 407 if (ident.Equals(kSource)) {
409 current_token_.kind = Token::kSOURCE; 408 current_token_.kind = Token::kSOURCE;
410 return; 409 return;
411 } 410 }
412 if (ident.Equals(kResource)) {
413 current_token_.kind = Token::kRESOURCE;
414 return;
415 }
416 ErrorMsg("Unrecognized library token"); 411 ErrorMsg("Unrecognized library token");
417 SkipLine(); 412 SkipLine();
418 } 413 }
419 414
420 415
421 void Scanner::ScanLiteralString(bool is_raw) { 416 void Scanner::ScanLiteralString(bool is_raw) {
422 ASSERT(!IsScanningString()); 417 ASSERT(!IsScanningString());
423 ASSERT(c0_ == '"' || c0_ == '\''); 418 ASSERT(c0_ == '"' || c0_ == '\'');
424 419
425 // Entering string scanning mode. 420 // Entering string scanning mode.
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
957 "%c%#"Px"", kPrivateKeySeparator, key_value); 952 "%c%#"Px"", kPrivateKeySeparator, key_value);
958 const String& result = String::Handle(String::New(private_key, Heap::kOld)); 953 const String& result = String::Handle(String::New(private_key, Heap::kOld));
959 return result.raw(); 954 return result.raw();
960 } 955 }
961 956
962 957
963 void Scanner::InitOnce() { 958 void Scanner::InitOnce() {
964 } 959 }
965 960
966 } // namespace dart 961 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698