| 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 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 } | 491 } |
| 492 if (is_valid && | 492 if (is_valid && |
| 493 ((*code_point > 0x10FFFF) || | 493 ((*code_point > 0x10FFFF) || |
| 494 ((*code_point & 0xFFFFF800) == 0xD800))) { | 494 ((*code_point & 0xFFFFF800) == 0xD800))) { |
| 495 ErrorMsg("invalid code point"); | 495 ErrorMsg("invalid code point"); |
| 496 } | 496 } |
| 497 } | 497 } |
| 498 | 498 |
| 499 | 499 |
| 500 void Scanner::ScanLiteralStringChars(bool is_raw) { | 500 void Scanner::ScanLiteralStringChars(bool is_raw) { |
| 501 GrowableArray<uint32_t> string_chars(64); | 501 GrowableArray<int32_t> string_chars(64); |
| 502 | 502 |
| 503 ASSERT(IsScanningString()); | 503 ASSERT(IsScanningString()); |
| 504 // We are at the first character of a string literal piece. A string literal | 504 // We are at the first character of a string literal piece. A string literal |
| 505 // can be broken up into multiple pieces by string interpolation. | 505 // can be broken up into multiple pieces by string interpolation. |
| 506 while (true) { | 506 while (true) { |
| 507 if ((c0_ == '\0') || ((c0_ == '\n') && !string_is_multiline_)) { | 507 if ((c0_ == '\0') || ((c0_ == '\n') && !string_is_multiline_)) { |
| 508 ErrorMsg("unterminated string literal"); | 508 ErrorMsg("unterminated string literal"); |
| 509 EndStringLiteral(); | 509 EndStringLiteral(); |
| 510 return; | 510 return; |
| 511 } | 511 } |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 952 "%c%#"Px"", kPrivateKeySeparator, key_value); | 952 "%c%#"Px"", kPrivateKeySeparator, key_value); |
| 953 const String& result = String::Handle(String::New(private_key, Heap::kOld)); | 953 const String& result = String::Handle(String::New(private_key, Heap::kOld)); |
| 954 return result.raw(); | 954 return result.raw(); |
| 955 } | 955 } |
| 956 | 956 |
| 957 | 957 |
| 958 void Scanner::InitOnce() { | 958 void Scanner::InitOnce() { |
| 959 } | 959 } |
| 960 | 960 |
| 961 } // namespace dart | 961 } // namespace dart |
| OLD | NEW |