Index: dart/lib/compiler/implementation/scanner/token.dart |
diff --git a/dart/lib/compiler/implementation/scanner/token.dart b/dart/lib/compiler/implementation/scanner/token.dart |
index 5a09c191ca5e3bc43ea5625c42d281b38d94d3b4..3848c070fe96f79d8e87e22ae17545ef1d0ddf33 100644 |
--- a/dart/lib/compiler/implementation/scanner/token.dart |
+++ b/dart/lib/compiler/implementation/scanner/token.dart |
@@ -139,7 +139,13 @@ class Token implements Spannable { |
/** |
* The number of characters parsed by this token. |
*/ |
- int get slowCharCount => slowToString().length; |
+ int get slowCharCount { |
+ if (info == BAD_INPUT_INFO) { |
floitsch
2012/10/12 12:23:28
add comment why this is 1.
|
+ return 1; |
+ } else { |
+ return slowToString().length; |
+ } |
+ } |
} |
/** |