| 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 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 // The script tag extends to the end of the line. Just treat this | 385 // The script tag extends to the end of the line. Just treat this |
| 386 // similar to a line comment. | 386 // similar to a line comment. |
| 387 SkipLine(); | 387 SkipLine(); |
| 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::New("library")); | 395 const String& kLibrary = String::Handle(Symbols::Library()); |
| 396 const String& kImport = String::Handle(Symbols::New("import")); | 396 const String& kImport = String::Handle(Symbols::Import()); |
| 397 const String& kSource = String::Handle(Symbols::New("source")); | 397 const String& kSource = String::Handle(Symbols::Source()); |
| 398 const String& kResource = String::Handle(Symbols::New("resource")); | 398 const String& kResource = String::Handle(Symbols::Resource()); |
| 399 const String& ident = String::Handle(ConsumeIdentChars(false)); | 399 const String& ident = String::Handle(ConsumeIdentChars(false)); |
| 400 if (ident.Equals(kLibrary)) { | 400 if (ident.Equals(kLibrary)) { |
| 401 current_token_.kind = Token::kLIBRARY; | 401 current_token_.kind = Token::kLIBRARY; |
| 402 return; | 402 return; |
| 403 } | 403 } |
| 404 if (ident.Equals(kImport)) { | 404 if (ident.Equals(kImport)) { |
| 405 current_token_.kind = Token::kIMPORT; | 405 current_token_.kind = Token::kIMPORT; |
| 406 return; | 406 return; |
| 407 } | 407 } |
| 408 if (ident.Equals(kSource)) { | 408 if (ident.Equals(kSource)) { |
| (...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 947 "%c%"PRIxPTR, kPrivateKeySeparator, key_value); | 947 "%c%"PRIxPTR, kPrivateKeySeparator, key_value); |
| 948 const String& result = String::Handle(String::New(private_key, Heap::kOld)); | 948 const String& result = String::Handle(String::New(private_key, Heap::kOld)); |
| 949 return result.raw(); | 949 return result.raw(); |
| 950 } | 950 } |
| 951 | 951 |
| 952 | 952 |
| 953 void Scanner::InitOnce() { | 953 void Scanner::InitOnce() { |
| 954 } | 954 } |
| 955 | 955 |
| 956 } // namespace dart | 956 } // namespace dart |
| OLD | NEW |