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

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
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 4665 matching lines...) Expand 10 before | Expand all | Expand 10 after
4676 } 4676 }
4677 4677
4678 4678
4679 bool Parser::IsSimpleLiteral(const AbstractType& type, Instance* value) { 4679 bool Parser::IsSimpleLiteral(const AbstractType& type, Instance* value) {
4680 bool no_check = type.IsDynamicType(); 4680 bool no_check = type.IsDynamicType();
4681 if ((CurrentToken() == Token::kINTEGER) && 4681 if ((CurrentToken() == Token::kINTEGER) &&
4682 (no_check || type.IsIntInterface() || type.IsNumberType())) { 4682 (no_check || type.IsIntInterface() || type.IsNumberType())) {
4683 *value = CurrentIntegerLiteral(); 4683 *value = CurrentIntegerLiteral();
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.IsDoubleType() || 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.IsBoolInterface())) {
4695 *value = Bool::True(); 4695 *value = Bool::True();
4696 return true; 4696 return true;
(...skipping 4538 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« runtime/vm/object.cc ('K') | « 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