Index: pkg/front_end/lib/src/fasta/scanner/string_scanner.dart |
diff --git a/pkg/front_end/lib/src/fasta/scanner/string_scanner.dart b/pkg/front_end/lib/src/fasta/scanner/string_scanner.dart |
index a7ac73b27a567fd9e2c3c1358e34e491e06aaecf..af35b011fcf60e5618ef3e6f6ef87ce94da9ca3d 100644 |
--- a/pkg/front_end/lib/src/fasta/scanner/string_scanner.dart |
+++ b/pkg/front_end/lib/src/fasta/scanner/string_scanner.dart |
@@ -8,7 +8,7 @@ import 'array_based_scanner.dart' show ArrayBasedScanner; |
import 'precedence.dart' show PrecedenceInfo; |
-import 'token.dart' show StringToken; |
+import 'token.dart' show CommentToken, DartDocToken, StringToken; |
/** |
* Scanner that reads from a String and creates tokens that points to |
@@ -50,5 +50,23 @@ class StringScanner extends ArrayBasedScanner { |
canonicalize: true); |
} |
+ @override |
+ CommentToken createCommentToken( |
+ PrecedenceInfo info, int start, bool asciiOnly, |
+ [int extraOffset = 0]) { |
+ return new CommentToken.fromSubstring( |
+ info, string, start, scanOffset + extraOffset, tokenStart, |
+ canonicalize: true); |
+ } |
+ |
+ @override |
+ DartDocToken createDartDocToken( |
+ PrecedenceInfo info, int start, bool asciiOnly, |
+ [int extraOffset = 0]) { |
+ return new DartDocToken.fromSubstring( |
+ info, string, start, scanOffset + extraOffset, tokenStart, |
+ canonicalize: true); |
+ } |
+ |
bool atEndOfFile() => scanOffset >= string.length - 1; |
} |