Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: runtime/vm/parser.cc

Issue 10876100: Convert double interface into abstract class (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/object_test.cc ('k') | runtime/vm/snapshot.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 4670 matching lines...) Expand 10 before | Expand all | Expand 10 after
4681 } 4681 }
4682 4682
4683 4683
4684 bool Parser::IsSimpleLiteral(const AbstractType& type, Instance* value) { 4684 bool Parser::IsSimpleLiteral(const AbstractType& type, Instance* value) {
4685 bool no_check = type.IsDynamicType(); 4685 bool no_check = type.IsDynamicType();
4686 if ((CurrentToken() == Token::kINTEGER) && 4686 if ((CurrentToken() == Token::kINTEGER) &&
4687 (no_check || type.IsIntInterface() || type.IsNumberType())) { 4687 (no_check || type.IsIntInterface() || type.IsNumberType())) {
4688 *value = CurrentIntegerLiteral(); 4688 *value = CurrentIntegerLiteral();
4689 return true; 4689 return true;
4690 } else if ((CurrentToken() == Token::kDOUBLE) && 4690 } else if ((CurrentToken() == Token::kDOUBLE) &&
4691 (no_check || type.IsDoubleInterface() || type.IsNumberType())) { 4691 (no_check || type.IsDoubleType() || type.IsNumberType())) {
4692 *value = CurrentDoubleLiteral(); 4692 *value = CurrentDoubleLiteral();
4693 return true; 4693 return true;
4694 } else if ((CurrentToken() == Token::kSTRING) && 4694 } else if ((CurrentToken() == Token::kSTRING) &&
4695 (no_check || type.IsStringInterface())) { 4695 (no_check || type.IsStringInterface())) {
4696 *value = CurrentLiteral()->raw(); 4696 *value = CurrentLiteral()->raw();
4697 return true; 4697 return true;
4698 } else if ((CurrentToken() == Token::kTRUE) && 4698 } else if ((CurrentToken() == Token::kTRUE) &&
4699 (no_check || type.IsBoolType())) { 4699 (no_check || type.IsBoolType())) {
4700 *value = Bool::True(); 4700 *value = Bool::True();
4701 return true; 4701 return true;
(...skipping 4538 matching lines...) Expand 10 before | Expand all | Expand 10 after
9240 void Parser::SkipQualIdent() { 9240 void Parser::SkipQualIdent() {
9241 ASSERT(IsIdentifier()); 9241 ASSERT(IsIdentifier());
9242 ConsumeToken(); 9242 ConsumeToken();
9243 if (CurrentToken() == Token::kPERIOD) { 9243 if (CurrentToken() == Token::kPERIOD) {
9244 ConsumeToken(); // Consume the kPERIOD token. 9244 ConsumeToken(); // Consume the kPERIOD token.
9245 ExpectIdentifier("identifier expected after '.'"); 9245 ExpectIdentifier("identifier expected after '.'");
9246 } 9246 }
9247 } 9247 }
9248 9248
9249 } // namespace dart 9249 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object_test.cc ('k') | runtime/vm/snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698