Index: pkg/front_end/lib/src/scanner/errors.dart |
diff --git a/pkg/front_end/lib/src/scanner/errors.dart b/pkg/front_end/lib/src/scanner/errors.dart |
index 0139561eab9fdd6452b352b7233c31e1546a0ced..3a8483fae17d0b8cf20fbb65632f04f4d9de67cd 100644 |
--- a/pkg/front_end/lib/src/scanner/errors.dart |
+++ b/pkg/front_end/lib/src/scanner/errors.dart |
@@ -105,12 +105,12 @@ void translateErrorToken(ErrorToken token, ReportError reportError) { |
case ErrorKind.MissingExponent: |
// TODO(paulberry,ahe): Fasta reports the error location as the entire |
// number; analyzer expects the end of the number. |
- charOffset = endOffset; |
+ charOffset = endOffset - 1; |
return _makeError(ScannerErrorCode.MISSING_DIGIT, null); |
case ErrorKind.ExpectedHexDigit: |
// TODO(paulberry,ahe): Fasta reports the error location as the entire |
// number; analyzer expects the end of the number. |
- charOffset = endOffset; |
+ charOffset = endOffset - 1; |
return _makeError(ScannerErrorCode.MISSING_HEX_DIGIT, null); |
case ErrorKind.NonAsciiIdentifier: |
case ErrorKind.NonAsciiWhitespace: |