| 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 8a3880242bc6e7943b3053e65f5b10bf658b23cf..e330f14944ac921e0d3559667f9990e5b1cbdebd 100644
|
| --- a/pkg/compiler/lib/src/scanner/scanner.dart
|
| +++ b/pkg/compiler/lib/src/scanner/scanner.dart
|
| @@ -330,8 +330,7 @@ abstract class AbstractScanner implements Scanner {
|
| }
|
|
|
| if (identical(next, $QUESTION)) {
|
| - appendPrecedenceToken(QUESTION_INFO);
|
| - return advance();
|
| + return tokenizeQuestion(next);
|
| }
|
|
|
| if (identical(next, $CLOSE_SQUARE_BRACKET)) {
|
| @@ -450,6 +449,20 @@ abstract class AbstractScanner implements Scanner {
|
| return select($EQ, CARET_EQ_INFO, CARET_INFO);
|
| }
|
|
|
| + int tokenizeQuestion(int next) {
|
| + // ? ?. ?? ??=
|
| + next = advance();
|
| + if (identical(next, $QUESTION)) {
|
| + return select($EQ, QUESTION_QUESTION_EQ_INFO, QUESTION_QUESTION_INFO);
|
| + } else if (identical(next, $PERIOD)) {
|
| + appendPrecedenceToken(QUESTION_PERIOD_INFO);
|
| + return advance();
|
| + } else {
|
| + appendPrecedenceToken(QUESTION_INFO);
|
| + return next;
|
| + }
|
| + }
|
| +
|
| int tokenizeBar(int next) {
|
| // | || |=
|
| next = advance();
|
|
|