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

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

Issue 1239513005: Switch on null-aware operators by default in analyzer. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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/analyzer/lib/src/generated/incremental_scanner.dart ('k') | pkg/analyzer/lib/src/task/dart.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/scanner.dart
diff --git a/pkg/analyzer/lib/src/generated/scanner.dart b/pkg/analyzer/lib/src/generated/scanner.dart
index f79401ed37caa433f9b7e97833f9f70241db67c3..9e028ca29686c8576ef50cad18146639563783bb 100644
--- a/pkg/analyzer/lib/src/generated/scanner.dart
+++ b/pkg/analyzer/lib/src/generated/scanner.dart
@@ -723,12 +723,6 @@ class Scanner {
bool _hasUnmatchedGroups = false;
/**
- * A flag indicating whether null-aware operators ('?.', '??', and '??=')
- * should be tokenized.
- */
- bool enableNullAwareOperators = false;
-
- /**
* Initialize a newly created scanner to scan characters from the given
* [source]. The given character [_reader] will be used to read the characters
* in the source. The given [_errorListener] will be informed of any errors
@@ -1664,11 +1658,11 @@ class Scanner {
int _tokenizeQuestion() {
// ? ?. ?? ??=
int next = _reader.advance();
- if (enableNullAwareOperators && next == 0x2E) {
+ if (next == 0x2E) {
// '.'
_appendTokenOfType(TokenType.QUESTION_PERIOD);
return _reader.advance();
- } else if (enableNullAwareOperators && next == 0x3F) {
+ } else if (next == 0x3F) {
// '?'
next = _reader.advance();
if (next == 0x3D) {
« no previous file with comments | « pkg/analyzer/lib/src/generated/incremental_scanner.dart ('k') | pkg/analyzer/lib/src/task/dart.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698