Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(727)

Unified Diff: pkg/front_end/lib/src/fasta/scanner/utf8_bytes_scanner.dart

Issue 2763833002: fasta.CommentToken implement analyzer.CommentToken (Closed)
Patch Set: merge Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/front_end/lib/src/fasta/scanner/token.dart ('k') | pkg/front_end/test/scanner_fasta_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/scanner/utf8_bytes_scanner.dart
diff --git a/pkg/front_end/lib/src/fasta/scanner/utf8_bytes_scanner.dart b/pkg/front_end/lib/src/fasta/scanner/utf8_bytes_scanner.dart
index 291ddf3290fdea1adcc69aa0b942267260a64f30..de8964b5c883641ecc8510c87882c68be085c515 100644
--- a/pkg/front_end/lib/src/fasta/scanner/utf8_bytes_scanner.dart
+++ b/pkg/front_end/lib/src/fasta/scanner/utf8_bytes_scanner.dart
@@ -10,7 +10,7 @@ import '../scanner.dart' show unicodeReplacementCharacter;
import 'precedence.dart' show PrecedenceInfo;
-import 'token.dart' show StringToken;
+import 'token.dart' show CommentToken, DartDocToken, StringToken;
import 'array_based_scanner.dart' show ArrayBasedScanner;
@@ -203,5 +203,21 @@ class Utf8BytesScanner extends ArrayBasedScanner {
info, bytes, start, byteOffset + extraOffset, asciiOnly, tokenStart);
}
+ @override
+ CommentToken createCommentToken(
+ PrecedenceInfo info, int start, bool asciiOnly,
+ [int extraOffset = 0]) {
+ return new CommentToken.fromUtf8Bytes(
+ info, bytes, start, byteOffset + extraOffset, asciiOnly, tokenStart);
+ }
+
+ @override
+ DartDocToken createDartDocToken(
+ PrecedenceInfo info, int start, bool asciiOnly,
+ [int extraOffset = 0]) {
+ return new DartDocToken.fromUtf8Bytes(
+ info, bytes, start, byteOffset + extraOffset, asciiOnly, tokenStart);
+ }
+
bool atEndOfFile() => byteOffset >= bytes.length - 1;
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/scanner/token.dart ('k') | pkg/front_end/test/scanner_fasta_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698