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

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

Issue 23996003: Be consistent with number scanning (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | « no previous file | no next file » | 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/scanner.h" 5 #include "vm/scanner.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/flags.h" 8 #include "vm/flags.h"
9 #include "vm/object.h" 9 #include "vm/object.h"
10 #include "vm/object_store.h" 10 #include "vm/object_store.h"
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 } else { 358 } else {
359 while (IsDecimalDigit(c0_)) { 359 while (IsDecimalDigit(c0_)) {
360 ReadChar(); 360 ReadChar();
361 } 361 }
362 if (c0_ == '.' && !dec_point_seen && IsDecimalDigit(LookaheadChar(1))) { 362 if (c0_ == '.' && !dec_point_seen && IsDecimalDigit(LookaheadChar(1))) {
363 Recognize(Token::kDOUBLE); 363 Recognize(Token::kDOUBLE);
364 while (IsDecimalDigit(c0_)) { 364 while (IsDecimalDigit(c0_)) {
365 ReadChar(); 365 ReadChar();
366 } 366 }
367 } 367 }
368 if ((c0_ == 'e') || (c0_ == 'E')) { 368 if (((c0_ == 'e') || (c0_ == 'E')) &&
369 (IsDecimalDigit(LookaheadChar(1)) ||
370 (LookaheadChar(1) == '-') ||
371 (LookaheadChar(1) == '+'))) {
369 Recognize(Token::kDOUBLE); 372 Recognize(Token::kDOUBLE);
370 if ((c0_ == '-') || (c0_ == '+')) { 373 if ((c0_ == '-') || (c0_ == '+')) {
371 ReadChar(); 374 ReadChar();
372 } 375 }
373 if (!IsDecimalDigit(c0_)) { 376 if (!IsDecimalDigit(c0_)) {
374 ErrorMsg("missing exponent digits"); 377 ErrorMsg("missing exponent digits");
375 return; 378 return;
376 } 379 }
377 while (IsDecimalDigit(c0_)) { 380 while (IsDecimalDigit(c0_)) {
378 ReadChar(); 381 ReadChar();
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 "%c%#" Px "", kPrivateKeySeparator, key_value); 950 "%c%#" Px "", kPrivateKeySeparator, key_value);
948 const String& result = String::Handle(String::New(private_key, Heap::kOld)); 951 const String& result = String::Handle(String::New(private_key, Heap::kOld));
949 return result.raw(); 952 return result.raw();
950 } 953 }
951 954
952 955
953 void Scanner::InitOnce() { 956 void Scanner::InitOnce() {
954 } 957 }
955 958
956 } // namespace dart 959 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698