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

Unified Diff: sdk/lib/_internal/compiler/implementation/scanner/scanner.dart

Issue 23583038: Fix dart2js decimal number tokenization. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Marked tests for d-suffixed doubles as failing for dartanalyzer. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/language/language_analyzer.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/scanner/scanner.dart
diff --git a/sdk/lib/_internal/compiler/implementation/scanner/scanner.dart b/sdk/lib/_internal/compiler/implementation/scanner/scanner.dart
index 75b9cb507c720ee36b6310a5255b6768b24a3e8d..4503fa872a809b75a234c8a973a6f7a979f99f95 100644
--- a/sdk/lib/_internal/compiler/implementation/scanner/scanner.dart
+++ b/sdk/lib/_internal/compiler/implementation/scanner/scanner.dart
@@ -462,12 +462,13 @@ abstract class AbstractScanner<T extends SourceString> implements Scanner {
int start = byteOffset;
while (true) {
next = advance();
+ int nextnext = peek();
ahe 2013/09/06 14:20:26 Can you avoid calling peek until you see a '.'?
if ($0 <= next && next <= $9) {
continue;
- } else if (identical(next, $PERIOD)) {
+ } else if (identical(next, $PERIOD)
ahe 2013/09/06 14:20:26 Would this work: } else if (identical(next, $PERI
+ && ($0 <= nextnext && nextnext <= $9)) {
return tokenizeFractionPart(advance(), start);
- } else if (identical(next, $e) || identical(next, $E)
- || identical(next, $d) || identical(next, $D)) {
+ } else if (identical(next, $e) || identical(next, $E)) {
return tokenizeFractionPart(next, start);
} else {
appendByteStringToken(INT_INFO, asciiString(start, 0));
@@ -543,9 +544,6 @@ abstract class AbstractScanner<T extends SourceString> implements Scanner {
appendPrecedenceToken(PERIOD_INFO);
return bigSwitch(next);
}
- if (identical(next, $d) || identical(next, $D)) {
- next = advance();
- }
appendByteStringToken(DOUBLE_INFO, asciiString(start, 0));
return next;
}
« no previous file with comments | « no previous file | tests/language/language_analyzer.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698