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

Unified Diff: pkg/analyzer/lib/src/dart/scanner/scanner.dart

Issue 2948473002: integrating fasta parser (Closed)
Patch Set: Created 3 years, 6 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 | « no previous file | pkg/analyzer/lib/src/generated/parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/scanner/scanner.dart
diff --git a/pkg/analyzer/lib/src/dart/scanner/scanner.dart b/pkg/analyzer/lib/src/dart/scanner/scanner.dart
index fba9b6321c3808347ae41cd25b5cb5401617043c..ad20ed23f7f29cb16712b176f04d3aba5d6bbb2e 100644
--- a/pkg/analyzer/lib/src/dart/scanner/scanner.dart
+++ b/pkg/analyzer/lib/src/dart/scanner/scanner.dart
@@ -48,10 +48,16 @@ class Scanner extends fe.Scanner {
factory Scanner(Source source, CharacterReader reader,
AnalysisErrorListener errorListener) =>
fe.Scanner.useFasta
- ? new _Scanner2(
- source, reader.getContents(), reader.offset, errorListener)
+ ? new Scanner.fasta(source, errorListener,
+ contents: reader.getContents(), offset: reader.offset)
: new Scanner._(source, reader, errorListener);
+ factory Scanner.fasta(Source source, AnalysisErrorListener errorListener,
+ {String contents, int offset: 0}) {
+ return new _Scanner2(
+ source, contents ?? source.contents.data, offset, errorListener);
+ }
+
Scanner._(this.source, CharacterReader reader, this._errorListener)
: super.create(reader);
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698