| 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/thread.h" | 10 #include "vm/thread.h" |
| (...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 escape_char = '\v'; | 511 escape_char = '\v'; |
| 512 break; | 512 break; |
| 513 case 'u': | 513 case 'u': |
| 514 case 'x': | 514 case 'x': |
| 515 if (!ScanEscapedCodePoint(&escape_char)) { | 515 if (!ScanEscapedCodePoint(&escape_char)) { |
| 516 EndStringLiteral(); | 516 EndStringLiteral(); |
| 517 return; | 517 return; |
| 518 } | 518 } |
| 519 break; | 519 break; |
| 520 default: | 520 default: |
| 521 if ((c0_ == '\0') || (c0_ == '\n') && !string_is_multiline_) { | 521 if ((c0_ == '\0') || ((c0_ == '\n') && !string_is_multiline_)) { |
| 522 ErrorMsg("unterminated string literal"); | 522 ErrorMsg("unterminated string literal"); |
| 523 EndStringLiteral(); | 523 EndStringLiteral(); |
| 524 return; | 524 return; |
| 525 } | 525 } |
| 526 escape_char = c0_; | 526 escape_char = c0_; |
| 527 break; | 527 break; |
| 528 } | 528 } |
| 529 string_chars.Add(escape_char); | 529 string_chars.Add(escape_char); |
| 530 } else if (c0_ == '$' && !is_raw) { | 530 } else if (c0_ == '$' && !is_raw) { |
| 531 // Scanned a string piece. | 531 // Scanned a string piece. |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 891 "%c%"PRIxPTR, kPrivateKeySeparator, key_value); | 891 "%c%"PRIxPTR, kPrivateKeySeparator, key_value); |
| 892 const String& result = String::Handle(String::New(private_key)); | 892 const String& result = String::Handle(String::New(private_key)); |
| 893 return result.raw(); | 893 return result.raw(); |
| 894 } | 894 } |
| 895 | 895 |
| 896 | 896 |
| 897 void Scanner::InitOnce() { | 897 void Scanner::InitOnce() { |
| 898 } | 898 } |
| 899 | 899 |
| 900 } // namespace dart | 900 } // namespace dart |
| OLD | NEW |