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

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

Issue 10933039: Make int an abstract class. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Now with correct base. 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 4921 matching lines...) Expand 10 before | Expand all | Expand 10 after
4932 return false; 4932 return false;
4933 } 4933 }
4934 } 4934 }
4935 return true; 4935 return true;
4936 } 4936 }
4937 4937
4938 4938
4939 bool Parser::IsSimpleLiteral(const AbstractType& type, Instance* value) { 4939 bool Parser::IsSimpleLiteral(const AbstractType& type, Instance* value) {
4940 bool no_check = type.IsDynamicType(); 4940 bool no_check = type.IsDynamicType();
4941 if ((CurrentToken() == Token::kINTEGER) && 4941 if ((CurrentToken() == Token::kINTEGER) &&
4942 (no_check || type.IsIntInterface() || type.IsNumberType())) { 4942 (no_check || type.IsIntType() || type.IsNumberType())) {
4943 *value = CurrentIntegerLiteral(); 4943 *value = CurrentIntegerLiteral();
4944 return true; 4944 return true;
4945 } else if ((CurrentToken() == Token::kDOUBLE) && 4945 } else if ((CurrentToken() == Token::kDOUBLE) &&
4946 (no_check || type.IsDoubleType() || type.IsNumberType())) { 4946 (no_check || type.IsDoubleType() || type.IsNumberType())) {
4947 *value = CurrentDoubleLiteral(); 4947 *value = CurrentDoubleLiteral();
4948 return true; 4948 return true;
4949 } else if ((CurrentToken() == Token::kSTRING) && 4949 } else if ((CurrentToken() == Token::kSTRING) &&
4950 (no_check || type.IsStringInterface())) { 4950 (no_check || type.IsStringInterface())) {
4951 *value = CurrentLiteral()->raw(); 4951 *value = CurrentLiteral()->raw();
4952 return true; 4952 return true;
(...skipping 4603 matching lines...) Expand 10 before | Expand all | Expand 10 after
9556 void Parser::SkipQualIdent() { 9556 void Parser::SkipQualIdent() {
9557 ASSERT(IsIdentifier()); 9557 ASSERT(IsIdentifier());
9558 ConsumeToken(); 9558 ConsumeToken();
9559 if (CurrentToken() == Token::kPERIOD) { 9559 if (CurrentToken() == Token::kPERIOD) {
9560 ConsumeToken(); // Consume the kPERIOD token. 9560 ConsumeToken(); // Consume the kPERIOD token.
9561 ExpectIdentifier("identifier expected after '.'"); 9561 ExpectIdentifier("identifier expected after '.'");
9562 } 9562 }
9563 } 9563 }
9564 9564
9565 } // namespace dart 9565 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698