| 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/parser.h" | 5 #include "vm/parser.h" |
| 6 | 6 |
| 7 #include "lib/invocation_mirror.h" | 7 #include "lib/invocation_mirror.h" |
| 8 #include "platform/utils.h" | 8 #include "platform/utils.h" |
| 9 #include "vm/bootstrap.h" | 9 #include "vm/bootstrap.h" |
| 10 #include "vm/class_finalizer.h" | 10 #include "vm/class_finalizer.h" |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 | 373 |
| 374 | 374 |
| 375 Token::Kind Parser::LookaheadToken(int num_tokens) { | 375 Token::Kind Parser::LookaheadToken(int num_tokens) { |
| 376 CompilerStats::num_tokens_lookahead++; | 376 CompilerStats::num_tokens_lookahead++; |
| 377 CompilerStats::num_token_checks++; | 377 CompilerStats::num_token_checks++; |
| 378 return tokens_iterator_.LookaheadTokenKind(num_tokens); | 378 return tokens_iterator_.LookaheadTokenKind(num_tokens); |
| 379 } | 379 } |
| 380 | 380 |
| 381 | 381 |
| 382 String* Parser::CurrentLiteral() const { | 382 String* Parser::CurrentLiteral() const { |
| 383 String& result = String::ZoneHandle(isolate_, String::null()); | 383 String& result = |
| 384 result = tokens_iterator_.CurrentLiteral(); | 384 String::ZoneHandle(isolate_, tokens_iterator_.CurrentLiteral()); |
| 385 return &result; | 385 return &result; |
| 386 } | 386 } |
| 387 | 387 |
| 388 | 388 |
| 389 RawDouble* Parser::CurrentDoubleLiteral() const { | 389 RawDouble* Parser::CurrentDoubleLiteral() const { |
| 390 literal_token_ ^= tokens_iterator_.CurrentToken(); | 390 literal_token_ ^= tokens_iterator_.CurrentToken(); |
| 391 ASSERT(literal_token_.kind() == Token::kDOUBLE); | 391 ASSERT(literal_token_.kind() == Token::kDOUBLE); |
| 392 return Double::RawCast(literal_token_.value()); | 392 return Double::RawCast(literal_token_.value()); |
| 393 } | 393 } |
| 394 | 394 |
| (...skipping 10379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10774 void Parser::SkipQualIdent() { | 10774 void Parser::SkipQualIdent() { |
| 10775 ASSERT(IsIdentifier()); | 10775 ASSERT(IsIdentifier()); |
| 10776 ConsumeToken(); | 10776 ConsumeToken(); |
| 10777 if (CurrentToken() == Token::kPERIOD) { | 10777 if (CurrentToken() == Token::kPERIOD) { |
| 10778 ConsumeToken(); // Consume the kPERIOD token. | 10778 ConsumeToken(); // Consume the kPERIOD token. |
| 10779 ExpectIdentifier("identifier expected after '.'"); | 10779 ExpectIdentifier("identifier expected after '.'"); |
| 10780 } | 10780 } |
| 10781 } | 10781 } |
| 10782 | 10782 |
| 10783 } // namespace dart | 10783 } // namespace dart |
| OLD | NEW |