| Index: pkg/compiler/lib/src/scanner/scanner.dart
|
| diff --git a/pkg/compiler/lib/src/scanner/scanner.dart b/pkg/compiler/lib/src/scanner/scanner.dart
|
| index 65db47ebbbd0a91bd8e9c5266e57c5d5ad18479f..d9ab3123aa52e67f42569b3cff92ab92bb2bd7fb 100644
|
| --- a/pkg/compiler/lib/src/scanner/scanner.dart
|
| +++ b/pkg/compiler/lib/src/scanner/scanner.dart
|
| @@ -8,13 +8,11 @@ abstract class Scanner {
|
| Token tokenize();
|
|
|
| factory Scanner(SourceFile file,
|
| - {bool includeComments: false, bool enableNullAwareOperators: false}) {
|
| + {bool includeComments: false}) {
|
| if (file is Utf8BytesSourceFile) {
|
| - return new Utf8BytesScanner(file, includeComments: includeComments,
|
| - enableNullAwareOperators: enableNullAwareOperators);
|
| + return new Utf8BytesScanner(file, includeComments: includeComments);
|
| } else {
|
| - return new StringScanner(file, includeComments: includeComments,
|
| - enableNullAwareOperators: enableNullAwareOperators);
|
| + return new StringScanner(file, includeComments: includeComments);
|
| }
|
| }
|
| }
|
| @@ -23,7 +21,6 @@ abstract class AbstractScanner implements Scanner {
|
| // TODO(ahe): Move this class to implementation.
|
|
|
| final bool includeComments;
|
| - final bool enableNullAwareOperators;
|
|
|
| /**
|
| * The string offset for the next token that will be created.
|
| @@ -58,7 +55,7 @@ abstract class AbstractScanner implements Scanner {
|
| final List<int> lineStarts = <int>[0];
|
|
|
| AbstractScanner(
|
| - this.file, this.includeComments, this.enableNullAwareOperators) {
|
| + this.file, this.includeComments) {
|
| this.tail = this.tokens;
|
| }
|
|
|
| @@ -458,27 +455,9 @@ abstract class AbstractScanner implements Scanner {
|
| // ? ?. ?? ??=
|
| next = advance();
|
| if (identical(next, $QUESTION)) {
|
| - if (enableNullAwareOperators) {
|
| - return select($EQ, QUESTION_QUESTION_EQ_INFO, QUESTION_QUESTION_INFO);
|
| - } else {
|
| - next = advance();
|
| - PrecedenceInfo info;
|
| - if (identical(next, $EQ)) {
|
| - info = QUESTION_QUESTION_EQ_INFO;
|
| - next = advance();
|
| - } else {
|
| - info = QUESTION_QUESTION_INFO;
|
| - }
|
| - appendErrorToken(new UnsupportedNullAwareToken(info.value, tokenStart));
|
| - return next;
|
| - }
|
| + return select($EQ, QUESTION_QUESTION_EQ_INFO, QUESTION_QUESTION_INFO);
|
| } else if (identical(next, $PERIOD)) {
|
| - if (enableNullAwareOperators) {
|
| - appendPrecedenceToken(QUESTION_PERIOD_INFO);
|
| - } else {
|
| - appendErrorToken(new UnsupportedNullAwareToken(
|
| - QUESTION_PERIOD_INFO.value, tokenStart));
|
| - }
|
| + appendPrecedenceToken(QUESTION_PERIOD_INFO);
|
| return advance();
|
| } else {
|
| appendPrecedenceToken(QUESTION_INFO);
|
|
|