| 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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 } | 329 } |
| 330 } | 330 } |
| 331 i++; | 331 i++; |
| 332 } | 332 } |
| 333 | 333 |
| 334 // We did not read a keyword. | 334 // We did not read a keyword. |
| 335 current_token_.kind = Token::kIDENT; | 335 current_token_.kind = Token::kIDENT; |
| 336 String& literal = | 336 String& literal = |
| 337 String::ZoneHandle(Symbols::New(source_, ident_pos, ident_length)); | 337 String::ZoneHandle(Symbols::New(source_, ident_pos, ident_length)); |
| 338 if (ident_char0 == kPrivateIdentifierStart) { | 338 if (ident_char0 == kPrivateIdentifierStart) { |
| 339 // Private identifiers are mangled on a per script basis. | 339 // Private identifiers are mangled on a per library basis. |
| 340 literal = String::Concat(literal, private_key_); | 340 literal = String::Concat(literal, private_key_); |
| 341 literal = Symbols::New(literal); | 341 literal = Symbols::New(literal); |
| 342 } | 342 } |
| 343 current_token_.literal = &literal; | 343 current_token_.literal = &literal; |
| 344 } | 344 } |
| 345 | 345 |
| 346 | 346 |
| 347 // Parse integer or double number literal of format: | 347 // Parse integer or double number literal of format: |
| 348 // NUMBER = INTEGER | DOUBLE | 348 // NUMBER = INTEGER | DOUBLE |
| 349 // INTEGER = D+ | (("0x" | "0X") H+) | 349 // INTEGER = D+ | (("0x" | "0X") H+) |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 944 "%c%#" Px "", kPrivateKeySeparator, key_value); | 944 "%c%#" Px "", kPrivateKeySeparator, key_value); |
| 945 const String& result = String::Handle(String::New(private_key, Heap::kOld)); | 945 const String& result = String::Handle(String::New(private_key, Heap::kOld)); |
| 946 return result.raw(); | 946 return result.raw(); |
| 947 } | 947 } |
| 948 | 948 |
| 949 | 949 |
| 950 void Scanner::InitOnce() { | 950 void Scanner::InitOnce() { |
| 951 } | 951 } |
| 952 | 952 |
| 953 } // namespace dart | 953 } // namespace dart |
| OLD | NEW |