| 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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 if (keywords_[i].keyword_len == ident_length) { | 305 if (keywords_[i].keyword_len == ident_length) { |
| 306 const char* keyword = keywords_[i].keyword_chars; | 306 const char* keyword = keywords_[i].keyword_chars; |
| 307 int char_pos = 0; | 307 int char_pos = 0; |
| 308 while ((char_pos < ident_length) && | 308 while ((char_pos < ident_length) && |
| 309 (keyword[char_pos] == source_.CharAt(ident_pos + char_pos))) { | 309 (keyword[char_pos] == source_.CharAt(ident_pos + char_pos))) { |
| 310 char_pos++; | 310 char_pos++; |
| 311 } | 311 } |
| 312 if (char_pos == ident_length) { | 312 if (char_pos == ident_length) { |
| 313 if (keywords_[i].keyword_symbol == NULL) { | 313 if (keywords_[i].keyword_symbol == NULL) { |
| 314 String& symbol = String::ZoneHandle(); | 314 String& symbol = String::ZoneHandle(); |
| 315 symbol |= keyword_symbol_table_.At(i); | 315 symbol ^= keyword_symbol_table_.At(i); |
| 316 ASSERT(!symbol.IsNull()); | 316 ASSERT(!symbol.IsNull()); |
| 317 keywords_[i].keyword_symbol = &symbol; | 317 keywords_[i].keyword_symbol = &symbol; |
| 318 } | 318 } |
| 319 current_token_.literal = keywords_[i].keyword_symbol; | 319 current_token_.literal = keywords_[i].keyword_symbol; |
| 320 current_token_.kind = keywords_[i].kind; | 320 current_token_.kind = keywords_[i].kind; |
| 321 return; | 321 return; |
| 322 } | 322 } |
| 323 } | 323 } |
| 324 i++; | 324 i++; |
| 325 } | 325 } |
| (...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 983 "%c%#"Px"", kPrivateKeySeparator, key_value); | 983 "%c%#"Px"", kPrivateKeySeparator, key_value); |
| 984 const String& result = String::Handle(String::New(private_key, Heap::kOld)); | 984 const String& result = String::Handle(String::New(private_key, Heap::kOld)); |
| 985 return result.raw(); | 985 return result.raw(); |
| 986 } | 986 } |
| 987 | 987 |
| 988 | 988 |
| 989 void Scanner::InitOnce() { | 989 void Scanner::InitOnce() { |
| 990 } | 990 } |
| 991 | 991 |
| 992 } // namespace dart | 992 } // namespace dart |
| OLD | NEW |