| 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 "vm/bigint_operations.h" | 7 #include "vm/bigint_operations.h" |
| 8 #include "vm/class_finalizer.h" | 8 #include "vm/class_finalizer.h" |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/compiler_stats.h" | 10 #include "vm/compiler_stats.h" |
| (...skipping 4673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4684 return true; | 4684 return true; |
| 4685 } else if ((CurrentToken() == Token::kDOUBLE) && | 4685 } else if ((CurrentToken() == Token::kDOUBLE) && |
| 4686 (no_check || type.IsDoubleInterface() || type.IsNumberType())) { | 4686 (no_check || type.IsDoubleInterface() || type.IsNumberType())) { |
| 4687 *value = CurrentDoubleLiteral(); | 4687 *value = CurrentDoubleLiteral(); |
| 4688 return true; | 4688 return true; |
| 4689 } else if ((CurrentToken() == Token::kSTRING) && | 4689 } else if ((CurrentToken() == Token::kSTRING) && |
| 4690 (no_check || type.IsStringInterface())) { | 4690 (no_check || type.IsStringInterface())) { |
| 4691 *value = CurrentLiteral()->raw(); | 4691 *value = CurrentLiteral()->raw(); |
| 4692 return true; | 4692 return true; |
| 4693 } else if ((CurrentToken() == Token::kTRUE) && | 4693 } else if ((CurrentToken() == Token::kTRUE) && |
| 4694 (no_check || type.IsBoolInterface())) { | 4694 (no_check || type.IsBoolType())) { |
| 4695 *value = Bool::True(); | 4695 *value = Bool::True(); |
| 4696 return true; | 4696 return true; |
| 4697 } else if ((CurrentToken() == Token::kFALSE) && | 4697 } else if ((CurrentToken() == Token::kFALSE) && |
| 4698 (no_check || type.IsBoolInterface())) { | 4698 (no_check || type.IsBoolType())) { |
| 4699 *value = Bool::False(); | 4699 *value = Bool::False(); |
| 4700 return true; | 4700 return true; |
| 4701 } else if (CurrentToken() == Token::kNULL) { | 4701 } else if (CurrentToken() == Token::kNULL) { |
| 4702 *value = Instance::null(); | 4702 *value = Instance::null(); |
| 4703 return true; | 4703 return true; |
| 4704 } | 4704 } |
| 4705 return false; | 4705 return false; |
| 4706 } | 4706 } |
| 4707 | 4707 |
| 4708 | 4708 |
| (...skipping 4526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9235 void Parser::SkipQualIdent() { | 9235 void Parser::SkipQualIdent() { |
| 9236 ASSERT(IsIdentifier()); | 9236 ASSERT(IsIdentifier()); |
| 9237 ConsumeToken(); | 9237 ConsumeToken(); |
| 9238 if (CurrentToken() == Token::kPERIOD) { | 9238 if (CurrentToken() == Token::kPERIOD) { |
| 9239 ConsumeToken(); // Consume the kPERIOD token. | 9239 ConsumeToken(); // Consume the kPERIOD token. |
| 9240 ExpectIdentifier("identifier expected after '.'"); | 9240 ExpectIdentifier("identifier expected after '.'"); |
| 9241 } | 9241 } |
| 9242 } | 9242 } |
| 9243 | 9243 |
| 9244 } // namespace dart | 9244 } // namespace dart |
| OLD | NEW |