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

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: Analyzer tests passing now. 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_dart2js.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..16c238433f068319c29ef81d7ec4e29d53a80eae 100644
--- a/sdk/lib/_internal/compiler/implementation/scanner/scanner.dart
+++ b/sdk/lib/_internal/compiler/implementation/scanner/scanner.dart
@@ -464,12 +464,15 @@ abstract class AbstractScanner<T extends SourceString> implements Scanner {
next = advance();
if ($0 <= next && next <= $9) {
continue;
- } else if (identical(next, $PERIOD)) {
- 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 {
+ if (identical(next, $PERIOD)) {
+ int nextnext = peek();
+ if ($0 <= nextnext && nextnext <= $9) {
+ return tokenizeFractionPart(advance(), start);
+ }
+ }
appendByteStringToken(INT_INFO, asciiString(start, 0));
return next;
}
@@ -543,9 +546,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_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698