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; |
} |