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

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

Issue 23711004: Fix 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 | tests/language/language.status » ('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/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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 if ((c0_ == '-') || (c0_ == '+')) { 370 if ((c0_ == '-') || (c0_ == '+')) {
371 ReadChar(); 371 ReadChar();
372 } 372 }
373 if (!IsDecimalDigit(c0_)) { 373 if (!IsDecimalDigit(c0_)) {
374 ErrorMsg("missing exponent digits"); 374 ErrorMsg("missing exponent digits");
375 return; 375 return;
376 } 376 }
377 while (IsDecimalDigit(c0_)) { 377 while (IsDecimalDigit(c0_)) {
378 ReadChar(); 378 ReadChar();
379 } 379 }
380 } else if (IsIdentStartChar(c0_)) {
381 ErrorMsg("illegal character in number");
382 return;
383 } 380 }
384 } 381 }
385 if (current_token_.kind != Token::kILLEGAL) { 382 if (current_token_.kind != Token::kILLEGAL) {
386 intptr_t len = lookahead_pos_ - token_start_; 383 intptr_t len = lookahead_pos_ - token_start_;
387 current_token_.literal = 384 current_token_.literal =
388 &String::ZoneHandle( 385 &String::ZoneHandle(
389 String::SubString(source_, token_start_, len, Heap::kOld)); 386 String::SubString(source_, token_start_, len, Heap::kOld));
390 } 387 }
391 } 388 }
392 389
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
950 "%c%#" Px "", kPrivateKeySeparator, key_value); 947 "%c%#" Px "", kPrivateKeySeparator, key_value);
951 const String& result = String::Handle(String::New(private_key, Heap::kOld)); 948 const String& result = String::Handle(String::New(private_key, Heap::kOld));
952 return result.raw(); 949 return result.raw();
953 } 950 }
954 951
955 952
956 void Scanner::InitOnce() { 953 void Scanner::InitOnce() {
957 } 954 }
958 955
959 } // namespace dart 956 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698