| OLD | NEW |
| 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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 | 376 |
| 377 void Scanner::ScanLibraryTag() { | 377 void Scanner::ScanLibraryTag() { |
| 378 ReadChar(); | 378 ReadChar(); |
| 379 if (c0_ == '!') { | 379 if (c0_ == '!') { |
| 380 Recognize(Token::kSCRIPTTAG); | 380 Recognize(Token::kSCRIPTTAG); |
| 381 // The script tag extends to the end of the line. Just treat this | 381 // The script tag extends to the end of the line. Just treat this |
| 382 // similar to a line comment. | 382 // similar to a line comment. |
| 383 SkipLine(); | 383 SkipLine(); |
| 384 return; | 384 return; |
| 385 } | 385 } |
| 386 if (!IsIdentStartChar(c0_)) { | 386 if (!IsLetter(c0_)) { |
| 387 ErrorMsg("Unrecognized library tag"); | 387 ErrorMsg("Unrecognized library tag"); |
| 388 SkipLine(); | 388 SkipLine(); |
| 389 return; | 389 return; |
| 390 } | 390 } |
| 391 const String& kLibrary = String::Handle(String::NewSymbol("library")); | 391 const String& kLibrary = String::Handle(String::NewSymbol("library")); |
| 392 const String& kImport = String::Handle(String::NewSymbol("import")); | 392 const String& kImport = String::Handle(String::NewSymbol("import")); |
| 393 const String& kSource = String::Handle(String::NewSymbol("source")); | 393 const String& kSource = String::Handle(String::NewSymbol("source")); |
| 394 const String& kResource = String::Handle(String::NewSymbol("resource")); | 394 const String& kResource = String::Handle(String::NewSymbol("resource")); |
| 395 const String& ident = String::Handle(ConsumeIdentChars(false)); | 395 const String& ident = String::Handle(ConsumeIdentChars(false)); |
| 396 if (ident.Equals(kLibrary)) { | 396 if (ident.Equals(kLibrary)) { |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 911 "%c%"PRIxPTR, kPrivateKeySeparator, key_value); | 911 "%c%"PRIxPTR, kPrivateKeySeparator, key_value); |
| 912 const String& result = String::Handle(String::New(private_key)); | 912 const String& result = String::Handle(String::New(private_key)); |
| 913 return result.raw(); | 913 return result.raw(); |
| 914 } | 914 } |
| 915 | 915 |
| 916 | 916 |
| 917 void Scanner::InitOnce() { | 917 void Scanner::InitOnce() { |
| 918 } | 918 } |
| 919 | 919 |
| 920 } // namespace dart | 920 } // namespace dart |
| OLD | NEW |