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 b7b66d52045225716bdeb50bc54db4eaa54e8c44..2c90b52e08dc999aabe3e684b3656cac90a80a4a 100644 |
--- a/pkg/front_end/lib/src/fasta/scanner/string_scanner.dart |
+++ b/pkg/front_end/lib/src/fasta/scanner/string_scanner.dart |
@@ -4,7 +4,9 @@ |
library dart2js.scanner.string_scanner; |
-import '../../scanner/token.dart' show TokenType; |
+import '../../scanner/token.dart' show SyntheticStringToken, TokenType; |
+ |
+import '../../scanner/token.dart' as analyzer show StringToken; |
import 'array_based_scanner.dart' show ArrayBasedScanner; |
@@ -45,7 +47,8 @@ class StringScanner extends ArrayBasedScanner { |
void handleUnicode(int startScanOffset) {} |
@override |
- StringToken createSubstringToken(TokenType type, int start, bool asciiOnly, |
+ analyzer.StringToken createSubstringToken( |
+ TokenType type, int start, bool asciiOnly, |
[int extraOffset = 0]) { |
return new StringToken.fromSubstring( |
type, string, start, scanOffset + extraOffset, tokenStart, |
@@ -53,6 +56,14 @@ class StringScanner extends ArrayBasedScanner { |
} |
@override |
+ analyzer.StringToken createSyntheticSubstringToken( |
+ TokenType type, int start, bool asciiOnly, String closingQuotes) { |
+ String source = string.substring(start, scanOffset); |
+ return new SyntheticStringToken( |
+ type, source + closingQuotes, start, source.length); |
+ } |
+ |
+ @override |
CommentToken createCommentToken(TokenType type, int start, bool asciiOnly, |
[int extraOffset = 0]) { |
return new CommentToken.fromSubstring( |