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

Unified Diff: pkg/analyzer/lib/src/generated/incremental_scanner.dart

Issue 1045553002: Implement the new '??' operator in analyzer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix if_null_precedence_test for unchecked operation. Created 5 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
Index: pkg/analyzer/lib/src/generated/incremental_scanner.dart
diff --git a/pkg/analyzer/lib/src/generated/incremental_scanner.dart b/pkg/analyzer/lib/src/generated/incremental_scanner.dart
index d5a3984c19ad426fbe501bec7516a8db1fb300c6..eed254504ab180774b76fe41d445e71ddbee40b7 100644
--- a/pkg/analyzer/lib/src/generated/incremental_scanner.dart
+++ b/pkg/analyzer/lib/src/generated/incremental_scanner.dart
@@ -6,6 +6,8 @@ library engine.incremental_scanner;
import "dart:math" as math;
+import 'package:analyzer/src/generated/engine.dart';
+
import 'error.dart';
import 'scanner.dart';
import 'source.dart';
@@ -35,6 +37,8 @@ class IncrementalScanner {
*/
final AnalysisErrorListener errorListener;
+ final AnalysisOptions _options;
+
/**
* A map from tokens that were copied to the copies of the tokens.
*/
@@ -62,8 +66,10 @@ class IncrementalScanner {
* Initialize a newly created scanner to scan characters within the given
* [source]. The content of the source can be read using the given [reader].
* Any errors that are found will be reported to the given [errorListener].
+ * [_options] will determine how scanning is to be performed.
*/
- IncrementalScanner(this.source, this.reader, this.errorListener);
+ IncrementalScanner(
+ this.source, this.reader, this.errorListener, this._options);
/**
* Return a map from tokens that were copied to the copies of the tokens.
@@ -218,6 +224,7 @@ class IncrementalScanner {
Token _scanRange(int start, int end) {
Scanner scanner = new Scanner(
source, new CharacterRangeReader(reader, start, end), errorListener);
+ scanner.enableNullAwareOperators = _options.enableNullAwareOperators;
return scanner.tokenize();
}
« no previous file with comments | « pkg/analyzer/lib/src/generated/incremental_resolver.dart ('k') | pkg/analyzer/lib/src/generated/static_type_analyzer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698