| 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/dart.h" | 8 #include "vm/dart.h" |
| 9 #include "vm/flags.h" | 9 #include "vm/flags.h" |
| 10 #include "vm/object.h" | 10 #include "vm/object.h" |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 } | 325 } |
| 326 i++; | 326 i++; |
| 327 } | 327 } |
| 328 } | 328 } |
| 329 | 329 |
| 330 // We did not read a keyword. | 330 // We did not read a keyword. |
| 331 current_token_.kind = Token::kIDENT; | 331 current_token_.kind = Token::kIDENT; |
| 332 String& literal = String::ZoneHandle(Z); | 332 String& literal = String::ZoneHandle(Z); |
| 333 if (ident_char0 == Library::kPrivateIdentifierStart) { | 333 if (ident_char0 == Library::kPrivateIdentifierStart) { |
| 334 // Private identifiers are mangled on a per library basis. | 334 // Private identifiers are mangled on a per library basis. |
| 335 literal = String::SubString(source_, ident_pos, ident_length); | 335 literal = String::SubString(T, source_, ident_pos, ident_length); |
| 336 literal = Symbols::FromConcat(T, literal, private_key_); | 336 literal = Symbols::FromConcat(T, literal, private_key_); |
| 337 } else { | 337 } else { |
| 338 literal = Symbols::New(T, source_, ident_pos, ident_length); | 338 literal = Symbols::New(T, source_, ident_pos, ident_length); |
| 339 } | 339 } |
| 340 current_token_.literal = &literal; | 340 current_token_.literal = &literal; |
| 341 } | 341 } |
| 342 | 342 |
| 343 | 343 |
| 344 // Parse integer or double number literal of format: | 344 // Parse integer or double number literal of format: |
| 345 // NUMBER = INTEGER | DOUBLE | 345 // NUMBER = INTEGER | DOUBLE |
| (...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 978 keywords_[i].keyword_symbol = &Symbols::Token(token); | 978 keywords_[i].keyword_symbol = &Symbols::Token(token); |
| 979 | 979 |
| 980 int ch = keywords_[i].keyword_chars[0] - 'a'; | 980 int ch = keywords_[i].keyword_chars[0] - 'a'; |
| 981 if (keywords_char_offset_[ch] == Token::kNumKeywords) { | 981 if (keywords_char_offset_[ch] == Token::kNumKeywords) { |
| 982 keywords_char_offset_[ch] = i; | 982 keywords_char_offset_[ch] = i; |
| 983 } | 983 } |
| 984 } | 984 } |
| 985 } | 985 } |
| 986 | 986 |
| 987 } // namespace dart | 987 } // namespace dart |
| OLD | NEW |