Version 2.14.2
* Cherry-pick refs/changes/85/211085/1 to stable
* Cherry-pick refs/changes/65/213265/1 to stable
* Cherry-pick refs/changes/43/213043/1 to stable
* Cherry-pick a6f97d13fcd63cdb67f06cc80f3b26df8ba63451 to stable
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b1dcdb8..4df1b37 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,25 @@
-## 2.14.0
+## 2.14.2 - 2021-09-16
+
+This is a patch release that fixes:
+
+- two dartdoc crashes (issues [dart-lang/dartdoc#2740][] and
+ [dart-lang/dartdoc#2755][]).
+- error messages when using the `>>>` operator on older language versions
+ (issue [#46886][]).
+- invalid `pubspec.lock` paths on Windows (issue [dart-lang/pub#3012][]).
+
+[dart-lang/dartdoc#2740]: https://github.com/dart-lang/dartdoc/issues/2740
+[dart-lang/dartdoc#2755]: https://github.com/dart-lang/dartdoc/issues/2755
+[#46886]: https://github.com/dart-lang/sdk/issues/46886
+[#45767]: https://github.com/dart-lang/sdk/issues/45767
+[dart-lang/pub#3012]: https://github.com/dart-lang/pub/issues/3012
+
+## 2.14.1 - 2021-09-09
+
+- Fixed an issue specific to the macOS ARM64 (Apple Silicon) SDK, where the Dart
+ commandline tools did not have the expected startup performance.
+
+## 2.14.0 - 2021-09-09
### Language
diff --git a/DEPS b/DEPS
index 6cd7c74..883660b 100644
--- a/DEPS
+++ b/DEPS
@@ -105,7 +105,7 @@
# For more details, see https://github.com/dart-lang/sdk/issues/30164
"dart_style_rev": "06bfd19593ed84dd288f67e02c6a753e6516288a",
- "dartdoc_rev" : "c9621b92c738ec21a348cc2de032858276e9c774",
+ "dartdoc_rev" : "a4ca86f9bf732d7adc4506f7373e0ed63251b646",
"devtools_rev" : "64cffbed6366329ad05e44d48fa2298367643bb6",
"jsshell_tag": "version:88.0",
"ffi_rev": "4dd32429880a57b64edaf54c9d5af8a9fa9a4ffb",
@@ -140,7 +140,7 @@
"pool_rev": "7abe634002a1ba8a0928eded086062f1307ccfae",
"process_rev": "56ece43b53b64c63ae51ec184b76bd5360c28d0b",
"protobuf_rev": "c1eb6cb51af39ccbaa1a8e19349546586a5c8e31",
- "pub_rev": "70b1a4f9229a36bac6340ec7eae2b2068baac96c",
+ "pub_rev": "214860e794076188869d586b047a4aaada1cb9a8",
"pub_semver_rev": "f50d80ef10c4b2fa5f4c8878036a4d9342c0cc82",
"resource_rev": "6b79867d0becf5395e5819a75720963b8298e9a7",
"root_certificates_rev": "692f6d6488af68e0121317a9c2c9eb393eb0ee50",
diff --git a/pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart b/pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart
index 71472cc..b768fc6 100644
--- a/pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart
@@ -3844,6 +3844,18 @@
identical(operator.kind, BANG_EQ_EQ_TOKEN) ||
isUnaryMinus(operator)) {
isOperator = true;
+ if (optional(">>", operator) &&
+ optional(">", operator.next!) &&
+ operator.charEnd == operator.next!.charOffset) {
+ // Special case use of triple-shift in cases where it isn't enabled.
+ reportRecoverableErrorWithEnd(
+ operator,
+ operator.next!,
+ codes.templateExperimentNotEnabled
+ .withArguments("triple-shift", "2.14"));
+ operator = rewriter.replaceNextTokensWithSyntheticToken(
+ name, 2, TokenType.GT_GT_GT);
+ }
}
}
@@ -4418,9 +4430,7 @@
begin = next = token.next!;
// Fall through to parse the block.
} else {
- token = ensureBlock(
- token,
- codes.templateExpectedFunctionBody,
+ token = ensureBlock(token, codes.templateExpectedFunctionBody,
/* missingBlockName = */ null);
listener.handleInvalidFunctionBody(token);
return token.endGroup!;
@@ -4883,6 +4893,19 @@
// Right associative, so we recurse at the same precedence
// level.
Token next = token.next!;
+ if (optional(">=", next.next!)) {
+ // Special case use of triple-shift in cases where it isn't
+ // enabled.
+ reportRecoverableErrorWithEnd(
+ next,
+ next.next!,
+ codes.templateExperimentNotEnabled
+ .withArguments("triple-shift", "2.14"));
+ assert(next == operator);
+ next = rewriter.replaceNextTokensWithSyntheticToken(
+ token, 2, TokenType.GT_GT_GT_EQ);
+ operator = next;
+ }
token = optional('throw', next.next!)
? parseThrowExpression(next, /* allowCascades = */ false)
: parsePrecedenceExpression(next, level, allowCascades);
@@ -4964,6 +4987,21 @@
lastBinaryExpressionLevel = level;
}
}
+ if (optional(">>", next) && next.charEnd == next.next!.charOffset) {
+ if (optional(">", next.next!)) {
+ // Special case use of triple-shift in cases where it isn't
+ // enabled.
+ reportRecoverableErrorWithEnd(
+ next,
+ next.next!,
+ codes.templateExperimentNotEnabled
+ .withArguments("triple-shift", "2.14"));
+ assert(next == operator);
+ next = rewriter.replaceNextTokensWithSyntheticToken(
+ token, 2, TokenType.GT_GT_GT);
+ operator = next;
+ }
+ }
listener.beginBinaryExpression(next);
// Left associative, so we recurse at the next higher
// precedence level.
@@ -5110,6 +5148,14 @@
return SELECTOR_PRECEDENCE;
}
return POSTFIX_PRECEDENCE;
+ } else if (identical(type, TokenType.GT_GT)) {
+ // ">>" followed by ">=" (without space between tokens) should for
+ // recovery be seen as ">>>=".
+ TokenType nextType = token.next!.type;
+ if (identical(nextType, TokenType.GT_EQ) &&
+ token.charEnd == token.next!.offset) {
+ return TokenType.GT_GT_GT_EQ.precedence;
+ }
} else if (identical(type, TokenType.QUESTION) &&
optional('[', token.next!)) {
// "?[" can be a null-aware bracket or a conditional. If it's a
diff --git a/pkg/_fe_analyzer_shared/lib/src/parser/token_stream_rewriter.dart b/pkg/_fe_analyzer_shared/lib/src/parser/token_stream_rewriter.dart
index e033fca..7d9c087 100644
--- a/pkg/_fe_analyzer_shared/lib/src/parser/token_stream_rewriter.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/parser/token_stream_rewriter.dart
@@ -162,6 +162,34 @@
return replacement;
}
+ /// Insert a new simple synthetic token of [newTokenType] after
+ /// [previousToken] instead of the [count] tokens actually coming after it and
+ /// return the new token.
+ /// The first old token will be linked from the new one (and the next ones can
+ /// be found via the next pointer chain on it) though, so it's not totally
+ /// gone.
+ ReplacementToken replaceNextTokensWithSyntheticToken(
+ Token previousToken, int count, TokenType newTokenType) {
+ assert(newTokenType is! Keyword,
+ 'use an unwritten variation of insertSyntheticKeyword instead');
+
+ // [token] <--> [a_1] <--> ... <--> [a_n] <--> [b]
+ ReplacementToken replacement =
+ new ReplacementToken(newTokenType, previousToken.next!);
+ insertToken(previousToken, replacement);
+ // [token] <--> [replacement] <--> [a_1] <--> ... <--> [a_n] <--> [b]
+
+ Token end = replacement.next!;
+ while (count > 0) {
+ count--;
+ end = end.next!;
+ }
+ _setNext(replacement, end);
+ // [token] <--> [replacement] <--> [b]
+
+ return replacement;
+ }
+
/// Insert a synthetic identifier after [token] and return the new identifier.
Token insertSyntheticIdentifier(Token token, [String value = '']) {
return insertToken(
diff --git a/pkg/front_end/parser_testcases/no-triple-shift/define_triple_shift_method.dart b/pkg/front_end/parser_testcases/no-triple-shift/define_triple_shift_method.dart
new file mode 100644
index 0000000..a0c220e
--- /dev/null
+++ b/pkg/front_end/parser_testcases/no-triple-shift/define_triple_shift_method.dart
@@ -0,0 +1,13 @@
+class Foo {
+ Foo operator >>>(_) => this;
+}
+
+main() {
+ Foo foo = new Foo();
+ foo >>> 42;
+ print(foo >>> 42);
+ print(foo >>>= 42);
+ if ((foo >>>= 42) == foo) {
+ print("same");
+ }
+}
diff --git a/pkg/front_end/parser_testcases/no-triple-shift/define_triple_shift_method.dart.expect b/pkg/front_end/parser_testcases/no-triple-shift/define_triple_shift_method.dart.expect
new file mode 100644
index 0000000..ace2d53
--- /dev/null
+++ b/pkg/front_end/parser_testcases/no-triple-shift/define_triple_shift_method.dart.expect
@@ -0,0 +1,164 @@
+Problems reported:
+
+parser/no-triple-shift/define_triple_shift_method:2:16: This requires the 'triple-shift' language feature to be enabled.
+ Foo operator >>>(_) => this;
+ ^^^
+
+parser/no-triple-shift/define_triple_shift_method:7:7: This requires the 'triple-shift' language feature to be enabled.
+ foo >>> 42;
+ ^^^
+
+parser/no-triple-shift/define_triple_shift_method:8:13: This requires the 'triple-shift' language feature to be enabled.
+ print(foo >>> 42);
+ ^^^
+
+parser/no-triple-shift/define_triple_shift_method:9:13: This requires the 'triple-shift' language feature to be enabled.
+ print(foo >>>= 42);
+ ^^^^
+
+parser/no-triple-shift/define_triple_shift_method:10:12: This requires the 'triple-shift' language feature to be enabled.
+ if ((foo >>>= 42) == foo) {
+ ^^^^
+
+beginCompilationUnit(class)
+ beginMetadataStar(class)
+ endMetadataStar(0)
+ beginClassOrNamedMixinApplicationPrelude(class)
+ handleIdentifier(Foo, classOrMixinDeclaration)
+ handleNoTypeVariables({)
+ beginClassDeclaration(class, null, Foo)
+ handleNoType(Foo)
+ handleClassExtends(null, 1)
+ handleClassNoWithClause()
+ handleClassOrMixinImplements(null, 0)
+ handleClassHeader(class, class, null)
+ beginClassOrMixinBody(DeclarationKind.Class, {)
+ beginMetadataStar(Foo)
+ endMetadataStar(0)
+ beginMember()
+ handleRecoverableError(Message[ExperimentNotEnabled, This requires the 'triple-shift' language feature to be enabled., Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'., {string: triple-shift, string2: 2.14}], >>, >)
+ beginMethod(null, null, null, null, null, operator)
+ handleIdentifier(Foo, typeReference)
+ handleNoTypeArguments(operator)
+ handleType(Foo, null)
+ handleOperatorName(operator, >>>)
+ handleNoTypeVariables(()
+ beginFormalParameters((, MemberKind.NonStaticMethod)
+ beginMetadataStar(_)
+ endMetadataStar(0)
+ beginFormalParameter(_, MemberKind.NonStaticMethod, null, null, null)
+ handleNoType(()
+ handleIdentifier(_, formalParameterDeclaration)
+ handleFormalParameterWithoutValue())
+ endFormalParameter(null, null, _, null, null, FormalParameterKind.mandatory, MemberKind.NonStaticMethod)
+ endFormalParameters(1, (, ), MemberKind.NonStaticMethod)
+ handleNoInitializers()
+ handleAsyncModifier(null, null)
+ handleThisExpression(this, expression)
+ handleExpressionFunctionBody(=>, ;)
+ endClassMethod(null, Foo, (, null, ;)
+ endMember()
+ endClassOrMixinBody(DeclarationKind.Class, 1, {, })
+ endClassDeclaration(class, })
+ endTopLevelDeclaration(main)
+ beginMetadataStar(main)
+ endMetadataStar(0)
+ beginTopLevelMember(main)
+ beginTopLevelMethod(}, null)
+ handleNoType(})
+ handleIdentifier(main, topLevelFunctionDeclaration)
+ handleNoTypeVariables(()
+ beginFormalParameters((, MemberKind.TopLevelMethod)
+ endFormalParameters(0, (, ), MemberKind.TopLevelMethod)
+ handleAsyncModifier(null, null)
+ beginBlockFunctionBody({)
+ beginMetadataStar(Foo)
+ endMetadataStar(0)
+ handleIdentifier(Foo, typeReference)
+ handleNoTypeArguments(foo)
+ handleType(Foo, null)
+ beginVariablesDeclaration(foo, null, null)
+ handleIdentifier(foo, localVariableDeclaration)
+ beginInitializedIdentifier(foo)
+ beginVariableInitializer(=)
+ beginNewExpression(new)
+ handleIdentifier(Foo, constructorReference)
+ beginConstructorReference(Foo)
+ handleNoTypeArguments(()
+ handleNoConstructorReferenceContinuationAfterTypeArguments(()
+ endConstructorReference(Foo, null, ()
+ beginArguments(()
+ endArguments(0, (, ))
+ endNewExpression(new)
+ endVariableInitializer(=)
+ endInitializedIdentifier(foo)
+ endVariablesDeclaration(1, ;)
+ handleIdentifier(foo, expression)
+ handleNoTypeArguments(>>)
+ handleNoArguments(>>)
+ handleSend(foo, >>)
+ handleRecoverableError(Message[ExperimentNotEnabled, This requires the 'triple-shift' language feature to be enabled., Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'., {string: triple-shift, string2: 2.14}], >>, >)
+ beginBinaryExpression(>>>)
+ handleLiteralInt(42)
+ endBinaryExpression(>>>)
+ handleExpressionStatement(;)
+ handleIdentifier(print, expression)
+ handleNoTypeArguments(()
+ beginArguments(()
+ handleIdentifier(foo, expression)
+ handleNoTypeArguments(>>)
+ handleNoArguments(>>)
+ handleSend(foo, >>)
+ handleRecoverableError(Message[ExperimentNotEnabled, This requires the 'triple-shift' language feature to be enabled., Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'., {string: triple-shift, string2: 2.14}], >>, >)
+ beginBinaryExpression(>>>)
+ handleLiteralInt(42)
+ endBinaryExpression(>>>)
+ endArguments(1, (, ))
+ handleSend(print, ;)
+ handleExpressionStatement(;)
+ handleIdentifier(print, expression)
+ handleNoTypeArguments(()
+ beginArguments(()
+ handleIdentifier(foo, expression)
+ handleNoTypeArguments(>>)
+ handleNoArguments(>>)
+ handleSend(foo, >>)
+ handleRecoverableError(Message[ExperimentNotEnabled, This requires the 'triple-shift' language feature to be enabled., Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'., {string: triple-shift, string2: 2.14}], >>, >=)
+ handleLiteralInt(42)
+ handleAssignmentExpression(>>>=)
+ endArguments(1, (, ))
+ handleSend(print, ;)
+ handleExpressionStatement(;)
+ beginIfStatement(if)
+ handleIdentifier(foo, expression)
+ handleNoTypeArguments(>>)
+ handleNoArguments(>>)
+ handleSend(foo, >>)
+ handleRecoverableError(Message[ExperimentNotEnabled, This requires the 'triple-shift' language feature to be enabled., Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'., {string: triple-shift, string2: 2.14}], >>, >=)
+ handleLiteralInt(42)
+ handleAssignmentExpression(>>>=)
+ handleParenthesizedExpression(()
+ beginBinaryExpression(==)
+ handleIdentifier(foo, expression)
+ handleNoTypeArguments())
+ handleNoArguments())
+ handleSend(foo, ))
+ endBinaryExpression(==)
+ handleParenthesizedCondition(()
+ beginThenStatement({)
+ beginBlock({, BlockKind(statement))
+ handleIdentifier(print, expression)
+ handleNoTypeArguments(()
+ beginArguments(()
+ beginLiteralString("same")
+ endLiteralString(0, ))
+ endArguments(1, (, ))
+ handleSend(print, ;)
+ handleExpressionStatement(;)
+ endBlock(1, {, }, BlockKind(statement))
+ endThenStatement(})
+ endIfStatement(if, null)
+ endBlockFunctionBody(5, {, })
+ endTopLevelMethod(main, null, })
+ endTopLevelDeclaration()
+endCompilationUnit(2, )
diff --git a/pkg/front_end/parser_testcases/no-triple-shift/define_triple_shift_method.dart.intertwined.expect b/pkg/front_end/parser_testcases/no-triple-shift/define_triple_shift_method.dart.intertwined.expect
new file mode 100644
index 0000000..0b9e045
--- /dev/null
+++ b/pkg/front_end/parser_testcases/no-triple-shift/define_triple_shift_method.dart.intertwined.expect
@@ -0,0 +1,380 @@
+parseUnit(class)
+ skipErrorTokens(class)
+ listener: beginCompilationUnit(class)
+ syntheticPreviousToken(class)
+ parseTopLevelDeclarationImpl(, Instance of 'DirectiveContext')
+ parseMetadataStar()
+ listener: beginMetadataStar(class)
+ listener: endMetadataStar(0)
+ parseTopLevelKeywordDeclaration(, class, Instance of 'DirectiveContext')
+ parseClassDeclarationModifiers(, class)
+ parseClassOrNamedMixinApplication(null, class)
+ listener: beginClassOrNamedMixinApplicationPrelude(class)
+ ensureIdentifier(class, classOrMixinDeclaration)
+ listener: handleIdentifier(Foo, classOrMixinDeclaration)
+ listener: handleNoTypeVariables({)
+ listener: beginClassDeclaration(class, null, Foo)
+ parseClass(Foo, class, class, Foo)
+ parseClassHeaderOpt(Foo, class, class)
+ parseClassExtendsOpt(Foo)
+ listener: handleNoType(Foo)
+ listener: handleClassExtends(null, 1)
+ parseWithClauseOpt(Foo)
+ listener: handleClassNoWithClause()
+ parseClassOrMixinImplementsOpt(Foo)
+ listener: handleClassOrMixinImplements(null, 0)
+ listener: handleClassHeader(class, class, null)
+ parseClassOrMixinOrExtensionBody(Foo, DeclarationKind.Class, Foo)
+ listener: beginClassOrMixinBody(DeclarationKind.Class, {)
+ notEofOrValue(}, Foo)
+ parseClassOrMixinOrExtensionMemberImpl({, DeclarationKind.Class, Foo)
+ parseMetadataStar({)
+ listener: beginMetadataStar(Foo)
+ listener: endMetadataStar(0)
+ listener: beginMember()
+ parseMethod({, null, null, null, null, null, null, {, Instance of 'SimpleType', null, operator, DeclarationKind.Class, Foo, false)
+ reportRecoverableErrorWithEnd(>>, >, Message[ExperimentNotEnabled, This requires the 'triple-shift' language feature to be enabled., Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'., {string: triple-shift, string2: 2.14}])
+ listener: handleRecoverableError(Message[ExperimentNotEnabled, This requires the 'triple-shift' language feature to be enabled., Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'., {string: triple-shift, string2: 2.14}], >>, >)
+ rewriter()
+ listener: beginMethod(null, null, null, null, null, operator)
+ listener: handleIdentifier(Foo, typeReference)
+ listener: handleNoTypeArguments(operator)
+ listener: handleType(Foo, null)
+ parseOperatorName(Foo)
+ listener: handleOperatorName(operator, >>>)
+ parseMethodTypeVar(>>>)
+ listener: handleNoTypeVariables(()
+ parseGetterOrFormalParameters(>>>, operator, false, MemberKind.NonStaticMethod)
+ parseFormalParameters(>>>, MemberKind.NonStaticMethod)
+ parseFormalParametersRest((, MemberKind.NonStaticMethod)
+ listener: beginFormalParameters((, MemberKind.NonStaticMethod)
+ parseFormalParameter((, FormalParameterKind.mandatory, MemberKind.NonStaticMethod)
+ parseMetadataStar(()
+ listener: beginMetadataStar(_)
+ listener: endMetadataStar(0)
+ listener: beginFormalParameter(_, MemberKind.NonStaticMethod, null, null, null)
+ listener: handleNoType(()
+ ensureIdentifier((, formalParameterDeclaration)
+ listener: handleIdentifier(_, formalParameterDeclaration)
+ listener: handleFormalParameterWithoutValue())
+ listener: endFormalParameter(null, null, _, null, null, FormalParameterKind.mandatory, MemberKind.NonStaticMethod)
+ listener: endFormalParameters(1, (, ), MemberKind.NonStaticMethod)
+ parseInitializersOpt())
+ listener: handleNoInitializers()
+ parseAsyncModifierOpt())
+ listener: handleAsyncModifier(null, null)
+ inPlainSync()
+ inPlainSync()
+ parseFunctionBody(), false, true)
+ parseExpressionFunctionBody(=>, false)
+ parseExpression(=>)
+ parsePrecedenceExpression(=>, 1, true)
+ parseUnaryExpression(=>, true)
+ parsePrimary(=>, expression)
+ parseThisExpression(=>, expression)
+ listener: handleThisExpression(this, expression)
+ ensureSemicolon(this)
+ listener: handleExpressionFunctionBody(=>, ;)
+ inGenerator()
+ listener: endClassMethod(null, Foo, (, null, ;)
+ listener: endMember()
+ notEofOrValue(}, })
+ listener: endClassOrMixinBody(DeclarationKind.Class, 1, {, })
+ listener: endClassDeclaration(class, })
+ listener: endTopLevelDeclaration(main)
+ parseTopLevelDeclarationImpl(}, Instance of 'DirectiveContext')
+ parseMetadataStar(})
+ listener: beginMetadataStar(main)
+ listener: endMetadataStar(0)
+ parseTopLevelMemberImpl(})
+ listener: beginTopLevelMember(main)
+ isReservedKeyword(()
+ parseTopLevelMethod(}, null, }, Instance of 'NoType', null, main, false)
+ listener: beginTopLevelMethod(}, null)
+ listener: handleNoType(})
+ ensureIdentifierPotentiallyRecovered(}, topLevelFunctionDeclaration, false)
+ listener: handleIdentifier(main, topLevelFunctionDeclaration)
+ parseMethodTypeVar(main)
+ listener: handleNoTypeVariables(()
+ parseGetterOrFormalParameters(main, main, false, MemberKind.TopLevelMethod)
+ parseFormalParameters(main, MemberKind.TopLevelMethod)
+ parseFormalParametersRest((, MemberKind.TopLevelMethod)
+ listener: beginFormalParameters((, MemberKind.TopLevelMethod)
+ listener: endFormalParameters(0, (, ), MemberKind.TopLevelMethod)
+ parseAsyncModifierOpt())
+ listener: handleAsyncModifier(null, null)
+ inPlainSync()
+ parseFunctionBody(), false, false)
+ listener: beginBlockFunctionBody({)
+ notEofOrValue(}, Foo)
+ parseStatement({)
+ parseStatementX({)
+ parseExpressionStatementOrDeclarationAfterModifiers({, {, null, null, null, false)
+ looksLikeLocalFunction(foo)
+ listener: beginMetadataStar(Foo)
+ listener: endMetadataStar(0)
+ listener: handleIdentifier(Foo, typeReference)
+ listener: handleNoTypeArguments(foo)
+ listener: handleType(Foo, null)
+ listener: beginVariablesDeclaration(foo, null, null)
+ parseVariablesDeclarationRest(Foo, true)
+ parseOptionallyInitializedIdentifier(Foo)
+ ensureIdentifier(Foo, localVariableDeclaration)
+ listener: handleIdentifier(foo, localVariableDeclaration)
+ listener: beginInitializedIdentifier(foo)
+ parseVariableInitializerOpt(foo)
+ listener: beginVariableInitializer(=)
+ parseExpression(=)
+ parsePrecedenceExpression(=, 1, true)
+ parseUnaryExpression(=, true)
+ parsePrimary(=, expression)
+ parseNewExpression(=)
+ isNextIdentifier(new)
+ listener: beginNewExpression(new)
+ parseConstructorReference(new, null)
+ ensureIdentifier(new, constructorReference)
+ listener: handleIdentifier(Foo, constructorReference)
+ listener: beginConstructorReference(Foo)
+ parseQualifiedRestOpt(Foo, constructorReferenceContinuation)
+ listener: handleNoTypeArguments(()
+ listener: handleNoConstructorReferenceContinuationAfterTypeArguments(()
+ listener: endConstructorReference(Foo, null, ()
+ parseConstructorInvocationArguments(Foo)
+ parseArgumentsRest(()
+ listener: beginArguments(()
+ listener: endArguments(0, (, ))
+ listener: endNewExpression(new)
+ listener: endVariableInitializer(=)
+ listener: endInitializedIdentifier(foo)
+ ensureSemicolon())
+ listener: endVariablesDeclaration(1, ;)
+ notEofOrValue(}, foo)
+ parseStatement(;)
+ parseStatementX(;)
+ parseExpressionStatementOrDeclarationAfterModifiers(;, ;, null, null, null, false)
+ looksLikeLocalFunction(foo)
+ parseExpressionStatement(;)
+ parseExpression(;)
+ parsePrecedenceExpression(;, 1, true)
+ parseUnaryExpression(;, true)
+ parsePrimary(;, expression)
+ parseSendOrFunctionLiteral(;, expression)
+ parseSend(;, expression)
+ isNextIdentifier(;)
+ ensureIdentifier(;, expression)
+ listener: handleIdentifier(foo, expression)
+ listener: handleNoTypeArguments(>>)
+ parseArgumentsOpt(foo)
+ listener: handleNoArguments(>>)
+ listener: handleSend(foo, >>)
+ reportRecoverableErrorWithEnd(>>, >, Message[ExperimentNotEnabled, This requires the 'triple-shift' language feature to be enabled., Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'., {string: triple-shift, string2: 2.14}])
+ listener: handleRecoverableError(Message[ExperimentNotEnabled, This requires the 'triple-shift' language feature to be enabled., Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'., {string: triple-shift, string2: 2.14}], >>, >)
+ rewriter()
+ listener: beginBinaryExpression(>>>)
+ parsePrecedenceExpression(>>>, 13, true)
+ parseUnaryExpression(>>>, true)
+ parsePrimary(>>>, expression)
+ parseLiteralInt(>>>)
+ listener: handleLiteralInt(42)
+ listener: endBinaryExpression(>>>)
+ ensureSemicolon(42)
+ listener: handleExpressionStatement(;)
+ notEofOrValue(}, print)
+ parseStatement(;)
+ parseStatementX(;)
+ parseExpressionStatementOrDeclarationAfterModifiers(;, ;, null, null, null, false)
+ looksLikeLocalFunction(print)
+ parseExpressionStatement(;)
+ parseExpression(;)
+ parsePrecedenceExpression(;, 1, true)
+ parseUnaryExpression(;, true)
+ parsePrimary(;, expression)
+ parseSendOrFunctionLiteral(;, expression)
+ looksLikeFunctionBody(;)
+ parseSend(;, expression)
+ isNextIdentifier(;)
+ ensureIdentifier(;, expression)
+ listener: handleIdentifier(print, expression)
+ listener: handleNoTypeArguments(()
+ parseArgumentsOpt(print)
+ parseArguments(print)
+ parseArgumentsRest(()
+ listener: beginArguments(()
+ parseExpression(()
+ parsePrecedenceExpression((, 1, true)
+ parseUnaryExpression((, true)
+ parsePrimary((, expression)
+ parseSendOrFunctionLiteral((, expression)
+ parseSend((, expression)
+ isNextIdentifier(()
+ ensureIdentifier((, expression)
+ listener: handleIdentifier(foo, expression)
+ listener: handleNoTypeArguments(>>)
+ parseArgumentsOpt(foo)
+ listener: handleNoArguments(>>)
+ listener: handleSend(foo, >>)
+ reportRecoverableErrorWithEnd(>>, >, Message[ExperimentNotEnabled, This requires the 'triple-shift' language feature to be enabled., Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'., {string: triple-shift, string2: 2.14}])
+ listener: handleRecoverableError(Message[ExperimentNotEnabled, This requires the 'triple-shift' language feature to be enabled., Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'., {string: triple-shift, string2: 2.14}], >>, >)
+ rewriter()
+ listener: beginBinaryExpression(>>>)
+ parsePrecedenceExpression(>>>, 13, true)
+ parseUnaryExpression(>>>, true)
+ parsePrimary(>>>, expression)
+ parseLiteralInt(>>>)
+ listener: handleLiteralInt(42)
+ listener: endBinaryExpression(>>>)
+ listener: endArguments(1, (, ))
+ listener: handleSend(print, ;)
+ ensureSemicolon())
+ listener: handleExpressionStatement(;)
+ notEofOrValue(}, print)
+ parseStatement(;)
+ parseStatementX(;)
+ parseExpressionStatementOrDeclarationAfterModifiers(;, ;, null, null, null, false)
+ looksLikeLocalFunction(print)
+ parseExpressionStatement(;)
+ parseExpression(;)
+ parsePrecedenceExpression(;, 1, true)
+ parseUnaryExpression(;, true)
+ parsePrimary(;, expression)
+ parseSendOrFunctionLiteral(;, expression)
+ looksLikeFunctionBody(;)
+ parseSend(;, expression)
+ isNextIdentifier(;)
+ ensureIdentifier(;, expression)
+ listener: handleIdentifier(print, expression)
+ listener: handleNoTypeArguments(()
+ parseArgumentsOpt(print)
+ parseArguments(print)
+ parseArgumentsRest(()
+ listener: beginArguments(()
+ parseExpression(()
+ parsePrecedenceExpression((, 1, true)
+ parseUnaryExpression((, true)
+ parsePrimary((, expression)
+ parseSendOrFunctionLiteral((, expression)
+ parseSend((, expression)
+ isNextIdentifier(()
+ ensureIdentifier((, expression)
+ listener: handleIdentifier(foo, expression)
+ listener: handleNoTypeArguments(>>)
+ parseArgumentsOpt(foo)
+ listener: handleNoArguments(>>)
+ listener: handleSend(foo, >>)
+ reportRecoverableErrorWithEnd(>>, >=, Message[ExperimentNotEnabled, This requires the 'triple-shift' language feature to be enabled., Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'., {string: triple-shift, string2: 2.14}])
+ listener: handleRecoverableError(Message[ExperimentNotEnabled, This requires the 'triple-shift' language feature to be enabled., Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'., {string: triple-shift, string2: 2.14}], >>, >=)
+ rewriter()
+ parsePrecedenceExpression(>>>=, 1, true)
+ parseUnaryExpression(>>>=, true)
+ parsePrimary(>>>=, expression)
+ parseLiteralInt(>>>=)
+ listener: handleLiteralInt(42)
+ listener: handleAssignmentExpression(>>>=)
+ listener: endArguments(1, (, ))
+ listener: handleSend(print, ;)
+ ensureSemicolon())
+ listener: handleExpressionStatement(;)
+ notEofOrValue(}, if)
+ parseStatement(;)
+ parseStatementX(;)
+ parseIfStatement(;)
+ listener: beginIfStatement(if)
+ ensureParenthesizedCondition(if)
+ parseExpressionInParenthesisRest(()
+ parseExpression(()
+ parsePrecedenceExpression((, 1, true)
+ parseUnaryExpression((, true)
+ parsePrimary((, expression)
+ parseParenthesizedExpressionOrFunctionLiteral(()
+ parseParenthesizedExpression(()
+ parseExpressionInParenthesis(()
+ parseExpressionInParenthesisRest(()
+ parseExpression(()
+ parsePrecedenceExpression((, 1, true)
+ parseUnaryExpression((, true)
+ parsePrimary((, expression)
+ parseSendOrFunctionLiteral((, expression)
+ parseSend((, expression)
+ isNextIdentifier(()
+ ensureIdentifier((, expression)
+ listener: handleIdentifier(foo, expression)
+ listener: handleNoTypeArguments(>>)
+ parseArgumentsOpt(foo)
+ listener: handleNoArguments(>>)
+ listener: handleSend(foo, >>)
+ reportRecoverableErrorWithEnd(>>, >=, Message[ExperimentNotEnabled, This requires the 'triple-shift' language feature to be enabled., Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'., {string: triple-shift, string2: 2.14}])
+ listener: handleRecoverableError(Message[ExperimentNotEnabled, This requires the 'triple-shift' language feature to be enabled., Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'., {string: triple-shift, string2: 2.14}], >>, >=)
+ rewriter()
+ parsePrecedenceExpression(>>>=, 1, true)
+ parseUnaryExpression(>>>=, true)
+ parsePrimary(>>>=, expression)
+ parseLiteralInt(>>>=)
+ listener: handleLiteralInt(42)
+ listener: handleAssignmentExpression(>>>=)
+ ensureCloseParen(42, ()
+ listener: handleParenthesizedExpression(()
+ listener: beginBinaryExpression(==)
+ parsePrecedenceExpression(==, 8, true)
+ parseUnaryExpression(==, true)
+ parsePrimary(==, expression)
+ parseSendOrFunctionLiteral(==, expression)
+ parseSend(==, expression)
+ isNextIdentifier(==)
+ ensureIdentifier(==, expression)
+ listener: handleIdentifier(foo, expression)
+ listener: handleNoTypeArguments())
+ parseArgumentsOpt(foo)
+ listener: handleNoArguments())
+ listener: handleSend(foo, ))
+ listener: endBinaryExpression(==)
+ ensureCloseParen(foo, ()
+ listener: handleParenthesizedCondition(()
+ listener: beginThenStatement({)
+ parseStatement())
+ parseStatementX())
+ parseBlock(), BlockKind(statement))
+ ensureBlock(), null, null)
+ listener: beginBlock({, BlockKind(statement))
+ notEofOrValue(}, print)
+ parseStatement({)
+ parseStatementX({)
+ parseExpressionStatementOrDeclarationAfterModifiers({, {, null, null, null, false)
+ looksLikeLocalFunction(print)
+ parseExpressionStatement({)
+ parseExpression({)
+ parsePrecedenceExpression({, 1, true)
+ parseUnaryExpression({, true)
+ parsePrimary({, expression)
+ parseSendOrFunctionLiteral({, expression)
+ looksLikeFunctionBody(;)
+ parseSend({, expression)
+ isNextIdentifier({)
+ ensureIdentifier({, expression)
+ listener: handleIdentifier(print, expression)
+ listener: handleNoTypeArguments(()
+ parseArgumentsOpt(print)
+ parseArguments(print)
+ parseArgumentsRest(()
+ listener: beginArguments(()
+ parseExpression(()
+ parsePrecedenceExpression((, 1, true)
+ parseUnaryExpression((, true)
+ parsePrimary((, expression)
+ parseLiteralString(()
+ parseSingleLiteralString(()
+ listener: beginLiteralString("same")
+ listener: endLiteralString(0, ))
+ listener: endArguments(1, (, ))
+ listener: handleSend(print, ;)
+ ensureSemicolon())
+ listener: handleExpressionStatement(;)
+ notEofOrValue(}, })
+ listener: endBlock(1, {, }, BlockKind(statement))
+ listener: endThenStatement(})
+ listener: endIfStatement(if, null)
+ notEofOrValue(}, })
+ listener: endBlockFunctionBody(5, {, })
+ listener: endTopLevelMethod(main, null, })
+ listener: endTopLevelDeclaration()
+ reportAllErrorTokens(class)
+ listener: endCompilationUnit(2, )
diff --git a/pkg/front_end/parser_testcases/no-triple-shift/define_triple_shift_method.dart.parser.expect b/pkg/front_end/parser_testcases/no-triple-shift/define_triple_shift_method.dart.parser.expect
new file mode 100644
index 0000000..71e5cb1
--- /dev/null
+++ b/pkg/front_end/parser_testcases/no-triple-shift/define_triple_shift_method.dart.parser.expect
@@ -0,0 +1,31 @@
+NOTICE: Stream was rewritten by parser!
+
+class Foo {
+Foo operator >>> (_) => this;
+}
+
+main() {
+Foo foo = new Foo();
+foo >>> 42;
+print(foo >>> 42);
+print(foo >>>= 42);
+if ((foo >>>= 42) == foo) {
+print("same");
+}
+}
+
+
+class[KeywordToken] Foo[StringToken] {[BeginToken]
+Foo[StringToken] operator[KeywordToken] >>>[ReplacementToken] ([BeginToken]_[StringToken])[SimpleToken] =>[SimpleToken] this[KeywordToken];[SimpleToken]
+}[SimpleToken]
+
+main[StringToken]([BeginToken])[SimpleToken] {[BeginToken]
+Foo[StringToken] foo[StringToken] =[SimpleToken] new[KeywordToken] Foo[StringToken]([BeginToken])[SimpleToken];[SimpleToken]
+foo[StringToken] >>>[ReplacementToken] 42[StringToken];[SimpleToken]
+print[StringToken]([BeginToken]foo[StringToken] >>>[ReplacementToken] 42[StringToken])[SimpleToken];[SimpleToken]
+print[StringToken]([BeginToken]foo[StringToken] >>>=[ReplacementToken] 42[StringToken])[SimpleToken];[SimpleToken]
+if[KeywordToken] ([BeginToken]([BeginToken]foo[StringToken] >>>=[ReplacementToken] 42[StringToken])[SimpleToken] ==[SimpleToken] foo[StringToken])[SimpleToken] {[BeginToken]
+print[StringToken]([BeginToken]"same"[StringToken])[SimpleToken];[SimpleToken]
+}[SimpleToken]
+}[SimpleToken]
+[SimpleToken]
diff --git a/pkg/front_end/parser_testcases/no-triple-shift/define_triple_shift_method.dart.scanner.expect b/pkg/front_end/parser_testcases/no-triple-shift/define_triple_shift_method.dart.scanner.expect
new file mode 100644
index 0000000..e7c9bf6
--- /dev/null
+++ b/pkg/front_end/parser_testcases/no-triple-shift/define_triple_shift_method.dart.scanner.expect
@@ -0,0 +1,29 @@
+class Foo {
+Foo operator >>>(_) => this;
+}
+
+main() {
+Foo foo = new Foo();
+foo >>> 42;
+print(foo >>> 42);
+print(foo >>>= 42);
+if ((foo >>>= 42) == foo) {
+print("same");
+}
+}
+
+
+class[KeywordToken] Foo[StringToken] {[BeginToken]
+Foo[StringToken] operator[KeywordToken] >>[SimpleToken]>[SimpleToken]([BeginToken]_[StringToken])[SimpleToken] =>[SimpleToken] this[KeywordToken];[SimpleToken]
+}[SimpleToken]
+
+main[StringToken]([BeginToken])[SimpleToken] {[BeginToken]
+Foo[StringToken] foo[StringToken] =[SimpleToken] new[KeywordToken] Foo[StringToken]([BeginToken])[SimpleToken];[SimpleToken]
+foo[StringToken] >>[SimpleToken]>[SimpleToken] 42[StringToken];[SimpleToken]
+print[StringToken]([BeginToken]foo[StringToken] >>[SimpleToken]>[SimpleToken] 42[StringToken])[SimpleToken];[SimpleToken]
+print[StringToken]([BeginToken]foo[StringToken] >>[SimpleToken]>=[SimpleToken] 42[StringToken])[SimpleToken];[SimpleToken]
+if[KeywordToken] ([BeginToken]([BeginToken]foo[StringToken] >>[SimpleToken]>=[SimpleToken] 42[StringToken])[SimpleToken] ==[SimpleToken] foo[StringToken])[SimpleToken] {[BeginToken]
+print[StringToken]([BeginToken]"same"[StringToken])[SimpleToken];[SimpleToken]
+}[SimpleToken]
+}[SimpleToken]
+[SimpleToken]
diff --git a/pkg/front_end/parser_testcases/no-triple-shift/define_triple_shift_method.equivalence_info b/pkg/front_end/parser_testcases/no-triple-shift/define_triple_shift_method.equivalence_info
new file mode 100644
index 0000000..ba86f89
--- /dev/null
+++ b/pkg/front_end/parser_testcases/no-triple-shift/define_triple_shift_method.equivalence_info
@@ -0,0 +1,7 @@
+files:
+ - define_triple_shift_method.dart
+ - define_triple_shift_method_prime.dart
+filters:
+ - ignoreListenerArguments
+ignored:
+ - handleRecoverableError
diff --git a/pkg/front_end/parser_testcases/no-triple-shift/define_triple_shift_method_prime.dart b/pkg/front_end/parser_testcases/no-triple-shift/define_triple_shift_method_prime.dart
new file mode 100644
index 0000000..c093e29
--- /dev/null
+++ b/pkg/front_end/parser_testcases/no-triple-shift/define_triple_shift_method_prime.dart
@@ -0,0 +1,13 @@
+class Foo {
+ Foo operator >>(_) => this;
+}
+
+main() {
+ Foo foo = new Foo();
+ foo >> 42;
+ print(foo >> 42);
+ print(foo >>= 42);
+ if ((foo >>= 42) == foo) {
+ print("same");
+ }
+}
diff --git a/pkg/front_end/parser_testcases/no-triple-shift/define_triple_shift_method_prime.dart.expect b/pkg/front_end/parser_testcases/no-triple-shift/define_triple_shift_method_prime.dart.expect
new file mode 100644
index 0000000..59fc3f1
--- /dev/null
+++ b/pkg/front_end/parser_testcases/no-triple-shift/define_triple_shift_method_prime.dart.expect
@@ -0,0 +1,137 @@
+beginCompilationUnit(class)
+ beginMetadataStar(class)
+ endMetadataStar(0)
+ beginClassOrNamedMixinApplicationPrelude(class)
+ handleIdentifier(Foo, classOrMixinDeclaration)
+ handleNoTypeVariables({)
+ beginClassDeclaration(class, null, Foo)
+ handleNoType(Foo)
+ handleClassExtends(null, 1)
+ handleClassNoWithClause()
+ handleClassOrMixinImplements(null, 0)
+ handleClassHeader(class, class, null)
+ beginClassOrMixinBody(DeclarationKind.Class, {)
+ beginMetadataStar(Foo)
+ endMetadataStar(0)
+ beginMember()
+ beginMethod(null, null, null, null, null, operator)
+ handleIdentifier(Foo, typeReference)
+ handleNoTypeArguments(operator)
+ handleType(Foo, null)
+ handleOperatorName(operator, >>)
+ handleNoTypeVariables(()
+ beginFormalParameters((, MemberKind.NonStaticMethod)
+ beginMetadataStar(_)
+ endMetadataStar(0)
+ beginFormalParameter(_, MemberKind.NonStaticMethod, null, null, null)
+ handleNoType(()
+ handleIdentifier(_, formalParameterDeclaration)
+ handleFormalParameterWithoutValue())
+ endFormalParameter(null, null, _, null, null, FormalParameterKind.mandatory, MemberKind.NonStaticMethod)
+ endFormalParameters(1, (, ), MemberKind.NonStaticMethod)
+ handleNoInitializers()
+ handleAsyncModifier(null, null)
+ handleThisExpression(this, expression)
+ handleExpressionFunctionBody(=>, ;)
+ endClassMethod(null, Foo, (, null, ;)
+ endMember()
+ endClassOrMixinBody(DeclarationKind.Class, 1, {, })
+ endClassDeclaration(class, })
+ endTopLevelDeclaration(main)
+ beginMetadataStar(main)
+ endMetadataStar(0)
+ beginTopLevelMember(main)
+ beginTopLevelMethod(}, null)
+ handleNoType(})
+ handleIdentifier(main, topLevelFunctionDeclaration)
+ handleNoTypeVariables(()
+ beginFormalParameters((, MemberKind.TopLevelMethod)
+ endFormalParameters(0, (, ), MemberKind.TopLevelMethod)
+ handleAsyncModifier(null, null)
+ beginBlockFunctionBody({)
+ beginMetadataStar(Foo)
+ endMetadataStar(0)
+ handleIdentifier(Foo, typeReference)
+ handleNoTypeArguments(foo)
+ handleType(Foo, null)
+ beginVariablesDeclaration(foo, null, null)
+ handleIdentifier(foo, localVariableDeclaration)
+ beginInitializedIdentifier(foo)
+ beginVariableInitializer(=)
+ beginNewExpression(new)
+ handleIdentifier(Foo, constructorReference)
+ beginConstructorReference(Foo)
+ handleNoTypeArguments(()
+ handleNoConstructorReferenceContinuationAfterTypeArguments(()
+ endConstructorReference(Foo, null, ()
+ beginArguments(()
+ endArguments(0, (, ))
+ endNewExpression(new)
+ endVariableInitializer(=)
+ endInitializedIdentifier(foo)
+ endVariablesDeclaration(1, ;)
+ handleIdentifier(foo, expression)
+ handleNoTypeArguments(>>)
+ handleNoArguments(>>)
+ handleSend(foo, >>)
+ beginBinaryExpression(>>)
+ handleLiteralInt(42)
+ endBinaryExpression(>>)
+ handleExpressionStatement(;)
+ handleIdentifier(print, expression)
+ handleNoTypeArguments(()
+ beginArguments(()
+ handleIdentifier(foo, expression)
+ handleNoTypeArguments(>>)
+ handleNoArguments(>>)
+ handleSend(foo, >>)
+ beginBinaryExpression(>>)
+ handleLiteralInt(42)
+ endBinaryExpression(>>)
+ endArguments(1, (, ))
+ handleSend(print, ;)
+ handleExpressionStatement(;)
+ handleIdentifier(print, expression)
+ handleNoTypeArguments(()
+ beginArguments(()
+ handleIdentifier(foo, expression)
+ handleNoTypeArguments(>>=)
+ handleNoArguments(>>=)
+ handleSend(foo, >>=)
+ handleLiteralInt(42)
+ handleAssignmentExpression(>>=)
+ endArguments(1, (, ))
+ handleSend(print, ;)
+ handleExpressionStatement(;)
+ beginIfStatement(if)
+ handleIdentifier(foo, expression)
+ handleNoTypeArguments(>>=)
+ handleNoArguments(>>=)
+ handleSend(foo, >>=)
+ handleLiteralInt(42)
+ handleAssignmentExpression(>>=)
+ handleParenthesizedExpression(()
+ beginBinaryExpression(==)
+ handleIdentifier(foo, expression)
+ handleNoTypeArguments())
+ handleNoArguments())
+ handleSend(foo, ))
+ endBinaryExpression(==)
+ handleParenthesizedCondition(()
+ beginThenStatement({)
+ beginBlock({, BlockKind(statement))
+ handleIdentifier(print, expression)
+ handleNoTypeArguments(()
+ beginArguments(()
+ beginLiteralString("same")
+ endLiteralString(0, ))
+ endArguments(1, (, ))
+ handleSend(print, ;)
+ handleExpressionStatement(;)
+ endBlock(1, {, }, BlockKind(statement))
+ endThenStatement(})
+ endIfStatement(if, null)
+ endBlockFunctionBody(5, {, })
+ endTopLevelMethod(main, null, })
+ endTopLevelDeclaration()
+endCompilationUnit(2, )
diff --git a/pkg/front_end/parser_testcases/no-triple-shift/define_triple_shift_method_prime.dart.intertwined.expect b/pkg/front_end/parser_testcases/no-triple-shift/define_triple_shift_method_prime.dart.intertwined.expect
new file mode 100644
index 0000000..1ded7b7
--- /dev/null
+++ b/pkg/front_end/parser_testcases/no-triple-shift/define_triple_shift_method_prime.dart.intertwined.expect
@@ -0,0 +1,365 @@
+parseUnit(class)
+ skipErrorTokens(class)
+ listener: beginCompilationUnit(class)
+ syntheticPreviousToken(class)
+ parseTopLevelDeclarationImpl(, Instance of 'DirectiveContext')
+ parseMetadataStar()
+ listener: beginMetadataStar(class)
+ listener: endMetadataStar(0)
+ parseTopLevelKeywordDeclaration(, class, Instance of 'DirectiveContext')
+ parseClassDeclarationModifiers(, class)
+ parseClassOrNamedMixinApplication(null, class)
+ listener: beginClassOrNamedMixinApplicationPrelude(class)
+ ensureIdentifier(class, classOrMixinDeclaration)
+ listener: handleIdentifier(Foo, classOrMixinDeclaration)
+ listener: handleNoTypeVariables({)
+ listener: beginClassDeclaration(class, null, Foo)
+ parseClass(Foo, class, class, Foo)
+ parseClassHeaderOpt(Foo, class, class)
+ parseClassExtendsOpt(Foo)
+ listener: handleNoType(Foo)
+ listener: handleClassExtends(null, 1)
+ parseWithClauseOpt(Foo)
+ listener: handleClassNoWithClause()
+ parseClassOrMixinImplementsOpt(Foo)
+ listener: handleClassOrMixinImplements(null, 0)
+ listener: handleClassHeader(class, class, null)
+ parseClassOrMixinOrExtensionBody(Foo, DeclarationKind.Class, Foo)
+ listener: beginClassOrMixinBody(DeclarationKind.Class, {)
+ notEofOrValue(}, Foo)
+ parseClassOrMixinOrExtensionMemberImpl({, DeclarationKind.Class, Foo)
+ parseMetadataStar({)
+ listener: beginMetadataStar(Foo)
+ listener: endMetadataStar(0)
+ listener: beginMember()
+ parseMethod({, null, null, null, null, null, null, {, Instance of 'SimpleType', null, operator, DeclarationKind.Class, Foo, false)
+ listener: beginMethod(null, null, null, null, null, operator)
+ listener: handleIdentifier(Foo, typeReference)
+ listener: handleNoTypeArguments(operator)
+ listener: handleType(Foo, null)
+ parseOperatorName(Foo)
+ listener: handleOperatorName(operator, >>)
+ parseMethodTypeVar(>>)
+ listener: handleNoTypeVariables(()
+ parseGetterOrFormalParameters(>>, operator, false, MemberKind.NonStaticMethod)
+ parseFormalParameters(>>, MemberKind.NonStaticMethod)
+ parseFormalParametersRest((, MemberKind.NonStaticMethod)
+ listener: beginFormalParameters((, MemberKind.NonStaticMethod)
+ parseFormalParameter((, FormalParameterKind.mandatory, MemberKind.NonStaticMethod)
+ parseMetadataStar(()
+ listener: beginMetadataStar(_)
+ listener: endMetadataStar(0)
+ listener: beginFormalParameter(_, MemberKind.NonStaticMethod, null, null, null)
+ listener: handleNoType(()
+ ensureIdentifier((, formalParameterDeclaration)
+ listener: handleIdentifier(_, formalParameterDeclaration)
+ listener: handleFormalParameterWithoutValue())
+ listener: endFormalParameter(null, null, _, null, null, FormalParameterKind.mandatory, MemberKind.NonStaticMethod)
+ listener: endFormalParameters(1, (, ), MemberKind.NonStaticMethod)
+ parseInitializersOpt())
+ listener: handleNoInitializers()
+ parseAsyncModifierOpt())
+ listener: handleAsyncModifier(null, null)
+ inPlainSync()
+ inPlainSync()
+ parseFunctionBody(), false, true)
+ parseExpressionFunctionBody(=>, false)
+ parseExpression(=>)
+ parsePrecedenceExpression(=>, 1, true)
+ parseUnaryExpression(=>, true)
+ parsePrimary(=>, expression)
+ parseThisExpression(=>, expression)
+ listener: handleThisExpression(this, expression)
+ ensureSemicolon(this)
+ listener: handleExpressionFunctionBody(=>, ;)
+ inGenerator()
+ listener: endClassMethod(null, Foo, (, null, ;)
+ listener: endMember()
+ notEofOrValue(}, })
+ listener: endClassOrMixinBody(DeclarationKind.Class, 1, {, })
+ listener: endClassDeclaration(class, })
+ listener: endTopLevelDeclaration(main)
+ parseTopLevelDeclarationImpl(}, Instance of 'DirectiveContext')
+ parseMetadataStar(})
+ listener: beginMetadataStar(main)
+ listener: endMetadataStar(0)
+ parseTopLevelMemberImpl(})
+ listener: beginTopLevelMember(main)
+ isReservedKeyword(()
+ parseTopLevelMethod(}, null, }, Instance of 'NoType', null, main, false)
+ listener: beginTopLevelMethod(}, null)
+ listener: handleNoType(})
+ ensureIdentifierPotentiallyRecovered(}, topLevelFunctionDeclaration, false)
+ listener: handleIdentifier(main, topLevelFunctionDeclaration)
+ parseMethodTypeVar(main)
+ listener: handleNoTypeVariables(()
+ parseGetterOrFormalParameters(main, main, false, MemberKind.TopLevelMethod)
+ parseFormalParameters(main, MemberKind.TopLevelMethod)
+ parseFormalParametersRest((, MemberKind.TopLevelMethod)
+ listener: beginFormalParameters((, MemberKind.TopLevelMethod)
+ listener: endFormalParameters(0, (, ), MemberKind.TopLevelMethod)
+ parseAsyncModifierOpt())
+ listener: handleAsyncModifier(null, null)
+ inPlainSync()
+ parseFunctionBody(), false, false)
+ listener: beginBlockFunctionBody({)
+ notEofOrValue(}, Foo)
+ parseStatement({)
+ parseStatementX({)
+ parseExpressionStatementOrDeclarationAfterModifiers({, {, null, null, null, false)
+ looksLikeLocalFunction(foo)
+ listener: beginMetadataStar(Foo)
+ listener: endMetadataStar(0)
+ listener: handleIdentifier(Foo, typeReference)
+ listener: handleNoTypeArguments(foo)
+ listener: handleType(Foo, null)
+ listener: beginVariablesDeclaration(foo, null, null)
+ parseVariablesDeclarationRest(Foo, true)
+ parseOptionallyInitializedIdentifier(Foo)
+ ensureIdentifier(Foo, localVariableDeclaration)
+ listener: handleIdentifier(foo, localVariableDeclaration)
+ listener: beginInitializedIdentifier(foo)
+ parseVariableInitializerOpt(foo)
+ listener: beginVariableInitializer(=)
+ parseExpression(=)
+ parsePrecedenceExpression(=, 1, true)
+ parseUnaryExpression(=, true)
+ parsePrimary(=, expression)
+ parseNewExpression(=)
+ isNextIdentifier(new)
+ listener: beginNewExpression(new)
+ parseConstructorReference(new, null)
+ ensureIdentifier(new, constructorReference)
+ listener: handleIdentifier(Foo, constructorReference)
+ listener: beginConstructorReference(Foo)
+ parseQualifiedRestOpt(Foo, constructorReferenceContinuation)
+ listener: handleNoTypeArguments(()
+ listener: handleNoConstructorReferenceContinuationAfterTypeArguments(()
+ listener: endConstructorReference(Foo, null, ()
+ parseConstructorInvocationArguments(Foo)
+ parseArgumentsRest(()
+ listener: beginArguments(()
+ listener: endArguments(0, (, ))
+ listener: endNewExpression(new)
+ listener: endVariableInitializer(=)
+ listener: endInitializedIdentifier(foo)
+ ensureSemicolon())
+ listener: endVariablesDeclaration(1, ;)
+ notEofOrValue(}, foo)
+ parseStatement(;)
+ parseStatementX(;)
+ parseExpressionStatementOrDeclarationAfterModifiers(;, ;, null, null, null, false)
+ looksLikeLocalFunction(foo)
+ parseExpressionStatement(;)
+ parseExpression(;)
+ parsePrecedenceExpression(;, 1, true)
+ parseUnaryExpression(;, true)
+ parsePrimary(;, expression)
+ parseSendOrFunctionLiteral(;, expression)
+ parseSend(;, expression)
+ isNextIdentifier(;)
+ ensureIdentifier(;, expression)
+ listener: handleIdentifier(foo, expression)
+ listener: handleNoTypeArguments(>>)
+ parseArgumentsOpt(foo)
+ listener: handleNoArguments(>>)
+ listener: handleSend(foo, >>)
+ listener: beginBinaryExpression(>>)
+ parsePrecedenceExpression(>>, 13, true)
+ parseUnaryExpression(>>, true)
+ parsePrimary(>>, expression)
+ parseLiteralInt(>>)
+ listener: handleLiteralInt(42)
+ listener: endBinaryExpression(>>)
+ ensureSemicolon(42)
+ listener: handleExpressionStatement(;)
+ notEofOrValue(}, print)
+ parseStatement(;)
+ parseStatementX(;)
+ parseExpressionStatementOrDeclarationAfterModifiers(;, ;, null, null, null, false)
+ looksLikeLocalFunction(print)
+ parseExpressionStatement(;)
+ parseExpression(;)
+ parsePrecedenceExpression(;, 1, true)
+ parseUnaryExpression(;, true)
+ parsePrimary(;, expression)
+ parseSendOrFunctionLiteral(;, expression)
+ looksLikeFunctionBody(;)
+ parseSend(;, expression)
+ isNextIdentifier(;)
+ ensureIdentifier(;, expression)
+ listener: handleIdentifier(print, expression)
+ listener: handleNoTypeArguments(()
+ parseArgumentsOpt(print)
+ parseArguments(print)
+ parseArgumentsRest(()
+ listener: beginArguments(()
+ parseExpression(()
+ parsePrecedenceExpression((, 1, true)
+ parseUnaryExpression((, true)
+ parsePrimary((, expression)
+ parseSendOrFunctionLiteral((, expression)
+ parseSend((, expression)
+ isNextIdentifier(()
+ ensureIdentifier((, expression)
+ listener: handleIdentifier(foo, expression)
+ listener: handleNoTypeArguments(>>)
+ parseArgumentsOpt(foo)
+ listener: handleNoArguments(>>)
+ listener: handleSend(foo, >>)
+ listener: beginBinaryExpression(>>)
+ parsePrecedenceExpression(>>, 13, true)
+ parseUnaryExpression(>>, true)
+ parsePrimary(>>, expression)
+ parseLiteralInt(>>)
+ listener: handleLiteralInt(42)
+ listener: endBinaryExpression(>>)
+ listener: endArguments(1, (, ))
+ listener: handleSend(print, ;)
+ ensureSemicolon())
+ listener: handleExpressionStatement(;)
+ notEofOrValue(}, print)
+ parseStatement(;)
+ parseStatementX(;)
+ parseExpressionStatementOrDeclarationAfterModifiers(;, ;, null, null, null, false)
+ looksLikeLocalFunction(print)
+ parseExpressionStatement(;)
+ parseExpression(;)
+ parsePrecedenceExpression(;, 1, true)
+ parseUnaryExpression(;, true)
+ parsePrimary(;, expression)
+ parseSendOrFunctionLiteral(;, expression)
+ looksLikeFunctionBody(;)
+ parseSend(;, expression)
+ isNextIdentifier(;)
+ ensureIdentifier(;, expression)
+ listener: handleIdentifier(print, expression)
+ listener: handleNoTypeArguments(()
+ parseArgumentsOpt(print)
+ parseArguments(print)
+ parseArgumentsRest(()
+ listener: beginArguments(()
+ parseExpression(()
+ parsePrecedenceExpression((, 1, true)
+ parseUnaryExpression((, true)
+ parsePrimary((, expression)
+ parseSendOrFunctionLiteral((, expression)
+ parseSend((, expression)
+ isNextIdentifier(()
+ ensureIdentifier((, expression)
+ listener: handleIdentifier(foo, expression)
+ listener: handleNoTypeArguments(>>=)
+ parseArgumentsOpt(foo)
+ listener: handleNoArguments(>>=)
+ listener: handleSend(foo, >>=)
+ parsePrecedenceExpression(>>=, 1, true)
+ parseUnaryExpression(>>=, true)
+ parsePrimary(>>=, expression)
+ parseLiteralInt(>>=)
+ listener: handleLiteralInt(42)
+ listener: handleAssignmentExpression(>>=)
+ listener: endArguments(1, (, ))
+ listener: handleSend(print, ;)
+ ensureSemicolon())
+ listener: handleExpressionStatement(;)
+ notEofOrValue(}, if)
+ parseStatement(;)
+ parseStatementX(;)
+ parseIfStatement(;)
+ listener: beginIfStatement(if)
+ ensureParenthesizedCondition(if)
+ parseExpressionInParenthesisRest(()
+ parseExpression(()
+ parsePrecedenceExpression((, 1, true)
+ parseUnaryExpression((, true)
+ parsePrimary((, expression)
+ parseParenthesizedExpressionOrFunctionLiteral(()
+ parseParenthesizedExpression(()
+ parseExpressionInParenthesis(()
+ parseExpressionInParenthesisRest(()
+ parseExpression(()
+ parsePrecedenceExpression((, 1, true)
+ parseUnaryExpression((, true)
+ parsePrimary((, expression)
+ parseSendOrFunctionLiteral((, expression)
+ parseSend((, expression)
+ isNextIdentifier(()
+ ensureIdentifier((, expression)
+ listener: handleIdentifier(foo, expression)
+ listener: handleNoTypeArguments(>>=)
+ parseArgumentsOpt(foo)
+ listener: handleNoArguments(>>=)
+ listener: handleSend(foo, >>=)
+ parsePrecedenceExpression(>>=, 1, true)
+ parseUnaryExpression(>>=, true)
+ parsePrimary(>>=, expression)
+ parseLiteralInt(>>=)
+ listener: handleLiteralInt(42)
+ listener: handleAssignmentExpression(>>=)
+ ensureCloseParen(42, ()
+ listener: handleParenthesizedExpression(()
+ listener: beginBinaryExpression(==)
+ parsePrecedenceExpression(==, 8, true)
+ parseUnaryExpression(==, true)
+ parsePrimary(==, expression)
+ parseSendOrFunctionLiteral(==, expression)
+ parseSend(==, expression)
+ isNextIdentifier(==)
+ ensureIdentifier(==, expression)
+ listener: handleIdentifier(foo, expression)
+ listener: handleNoTypeArguments())
+ parseArgumentsOpt(foo)
+ listener: handleNoArguments())
+ listener: handleSend(foo, ))
+ listener: endBinaryExpression(==)
+ ensureCloseParen(foo, ()
+ listener: handleParenthesizedCondition(()
+ listener: beginThenStatement({)
+ parseStatement())
+ parseStatementX())
+ parseBlock(), BlockKind(statement))
+ ensureBlock(), null, null)
+ listener: beginBlock({, BlockKind(statement))
+ notEofOrValue(}, print)
+ parseStatement({)
+ parseStatementX({)
+ parseExpressionStatementOrDeclarationAfterModifiers({, {, null, null, null, false)
+ looksLikeLocalFunction(print)
+ parseExpressionStatement({)
+ parseExpression({)
+ parsePrecedenceExpression({, 1, true)
+ parseUnaryExpression({, true)
+ parsePrimary({, expression)
+ parseSendOrFunctionLiteral({, expression)
+ looksLikeFunctionBody(;)
+ parseSend({, expression)
+ isNextIdentifier({)
+ ensureIdentifier({, expression)
+ listener: handleIdentifier(print, expression)
+ listener: handleNoTypeArguments(()
+ parseArgumentsOpt(print)
+ parseArguments(print)
+ parseArgumentsRest(()
+ listener: beginArguments(()
+ parseExpression(()
+ parsePrecedenceExpression((, 1, true)
+ parseUnaryExpression((, true)
+ parsePrimary((, expression)
+ parseLiteralString(()
+ parseSingleLiteralString(()
+ listener: beginLiteralString("same")
+ listener: endLiteralString(0, ))
+ listener: endArguments(1, (, ))
+ listener: handleSend(print, ;)
+ ensureSemicolon())
+ listener: handleExpressionStatement(;)
+ notEofOrValue(}, })
+ listener: endBlock(1, {, }, BlockKind(statement))
+ listener: endThenStatement(})
+ listener: endIfStatement(if, null)
+ notEofOrValue(}, })
+ listener: endBlockFunctionBody(5, {, })
+ listener: endTopLevelMethod(main, null, })
+ listener: endTopLevelDeclaration()
+ reportAllErrorTokens(class)
+ listener: endCompilationUnit(2, )
diff --git a/pkg/front_end/parser_testcases/no-triple-shift/define_triple_shift_method_prime.dart.parser.expect b/pkg/front_end/parser_testcases/no-triple-shift/define_triple_shift_method_prime.dart.parser.expect
new file mode 100644
index 0000000..4441541
--- /dev/null
+++ b/pkg/front_end/parser_testcases/no-triple-shift/define_triple_shift_method_prime.dart.parser.expect
@@ -0,0 +1,29 @@
+class Foo {
+Foo operator >>(_) => this;
+}
+
+main() {
+Foo foo = new Foo();
+foo >> 42;
+print(foo >> 42);
+print(foo >>= 42);
+if ((foo >>= 42) == foo) {
+print("same");
+}
+}
+
+
+class[KeywordToken] Foo[StringToken] {[BeginToken]
+Foo[StringToken] operator[KeywordToken] >>[SimpleToken]([BeginToken]_[StringToken])[SimpleToken] =>[SimpleToken] this[KeywordToken];[SimpleToken]
+}[SimpleToken]
+
+main[StringToken]([BeginToken])[SimpleToken] {[BeginToken]
+Foo[StringToken] foo[StringToken] =[SimpleToken] new[KeywordToken] Foo[StringToken]([BeginToken])[SimpleToken];[SimpleToken]
+foo[StringToken] >>[SimpleToken] 42[StringToken];[SimpleToken]
+print[StringToken]([BeginToken]foo[StringToken] >>[SimpleToken] 42[StringToken])[SimpleToken];[SimpleToken]
+print[StringToken]([BeginToken]foo[StringToken] >>=[SimpleToken] 42[StringToken])[SimpleToken];[SimpleToken]
+if[KeywordToken] ([BeginToken]([BeginToken]foo[StringToken] >>=[SimpleToken] 42[StringToken])[SimpleToken] ==[SimpleToken] foo[StringToken])[SimpleToken] {[BeginToken]
+print[StringToken]([BeginToken]"same"[StringToken])[SimpleToken];[SimpleToken]
+}[SimpleToken]
+}[SimpleToken]
+[SimpleToken]
diff --git a/pkg/front_end/parser_testcases/no-triple-shift/define_triple_shift_method_prime.dart.scanner.expect b/pkg/front_end/parser_testcases/no-triple-shift/define_triple_shift_method_prime.dart.scanner.expect
new file mode 100644
index 0000000..4441541
--- /dev/null
+++ b/pkg/front_end/parser_testcases/no-triple-shift/define_triple_shift_method_prime.dart.scanner.expect
@@ -0,0 +1,29 @@
+class Foo {
+Foo operator >>(_) => this;
+}
+
+main() {
+Foo foo = new Foo();
+foo >> 42;
+print(foo >> 42);
+print(foo >>= 42);
+if ((foo >>= 42) == foo) {
+print("same");
+}
+}
+
+
+class[KeywordToken] Foo[StringToken] {[BeginToken]
+Foo[StringToken] operator[KeywordToken] >>[SimpleToken]([BeginToken]_[StringToken])[SimpleToken] =>[SimpleToken] this[KeywordToken];[SimpleToken]
+}[SimpleToken]
+
+main[StringToken]([BeginToken])[SimpleToken] {[BeginToken]
+Foo[StringToken] foo[StringToken] =[SimpleToken] new[KeywordToken] Foo[StringToken]([BeginToken])[SimpleToken];[SimpleToken]
+foo[StringToken] >>[SimpleToken] 42[StringToken];[SimpleToken]
+print[StringToken]([BeginToken]foo[StringToken] >>[SimpleToken] 42[StringToken])[SimpleToken];[SimpleToken]
+print[StringToken]([BeginToken]foo[StringToken] >>=[SimpleToken] 42[StringToken])[SimpleToken];[SimpleToken]
+if[KeywordToken] ([BeginToken]([BeginToken]foo[StringToken] >>=[SimpleToken] 42[StringToken])[SimpleToken] ==[SimpleToken] foo[StringToken])[SimpleToken] {[BeginToken]
+print[StringToken]([BeginToken]"same"[StringToken])[SimpleToken];[SimpleToken]
+}[SimpleToken]
+}[SimpleToken]
+[SimpleToken]
diff --git a/pkg/front_end/parser_testcases/no-triple-shift/simple_attempted_usage_of_triple_shift.dart b/pkg/front_end/parser_testcases/no-triple-shift/simple_attempted_usage_of_triple_shift.dart
new file mode 100644
index 0000000..5ca7d9e
--- /dev/null
+++ b/pkg/front_end/parser_testcases/no-triple-shift/simple_attempted_usage_of_triple_shift.dart
@@ -0,0 +1,6 @@
+// From https://github.com/dart-lang/sdk/issues/46886
+
+void main(List<String> arguments) {
+ var x = 10 >>> 2;
+ print('x: $x');
+}
diff --git a/pkg/front_end/parser_testcases/no-triple-shift/simple_attempted_usage_of_triple_shift.dart.expect b/pkg/front_end/parser_testcases/no-triple-shift/simple_attempted_usage_of_triple_shift.dart.expect
new file mode 100644
index 0000000..c88d460
--- /dev/null
+++ b/pkg/front_end/parser_testcases/no-triple-shift/simple_attempted_usage_of_triple_shift.dart.expect
@@ -0,0 +1,64 @@
+Problems reported:
+
+parser/no-triple-shift/simple_attempted_usage_of_triple_shift:4:14: This requires the 'triple-shift' language feature to be enabled.
+ var x = 10 >>> 2;
+ ^^^
+
+beginCompilationUnit(void)
+ beginMetadataStar(void)
+ endMetadataStar(0)
+ beginTopLevelMember(void)
+ beginTopLevelMethod(, null)
+ handleVoidKeyword(void)
+ handleIdentifier(main, topLevelFunctionDeclaration)
+ handleNoTypeVariables(()
+ beginFormalParameters((, MemberKind.TopLevelMethod)
+ beginMetadataStar(List)
+ endMetadataStar(0)
+ beginFormalParameter(List, MemberKind.TopLevelMethod, null, null, null)
+ handleIdentifier(List, typeReference)
+ beginTypeArguments(<)
+ handleIdentifier(String, typeReference)
+ handleNoTypeArguments(>)
+ handleType(String, null)
+ endTypeArguments(1, <, >)
+ handleType(List, null)
+ handleIdentifier(arguments, formalParameterDeclaration)
+ handleFormalParameterWithoutValue())
+ endFormalParameter(null, null, arguments, null, null, FormalParameterKind.mandatory, MemberKind.TopLevelMethod)
+ endFormalParameters(1, (, ), MemberKind.TopLevelMethod)
+ handleAsyncModifier(null, null)
+ beginBlockFunctionBody({)
+ beginMetadataStar(var)
+ endMetadataStar(0)
+ handleNoType(var)
+ beginVariablesDeclaration(x, null, var)
+ handleIdentifier(x, localVariableDeclaration)
+ beginInitializedIdentifier(x)
+ beginVariableInitializer(=)
+ handleLiteralInt(10)
+ handleRecoverableError(Message[ExperimentNotEnabled, This requires the 'triple-shift' language feature to be enabled., Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'., {string: triple-shift, string2: 2.14}], >>, >)
+ beginBinaryExpression(>>>)
+ handleLiteralInt(2)
+ endBinaryExpression(>>>)
+ endVariableInitializer(=)
+ endInitializedIdentifier(x)
+ endVariablesDeclaration(1, ;)
+ handleIdentifier(print, expression)
+ handleNoTypeArguments(()
+ beginArguments(()
+ beginLiteralString('x: )
+ handleIdentifier(x, expression)
+ handleNoTypeArguments(')
+ handleNoArguments(')
+ handleSend(x, ')
+ handleInterpolationExpression($, null)
+ handleStringPart(')
+ endLiteralString(1, ))
+ endArguments(1, (, ))
+ handleSend(print, ;)
+ handleExpressionStatement(;)
+ endBlockFunctionBody(2, {, })
+ endTopLevelMethod(void, null, })
+ endTopLevelDeclaration()
+endCompilationUnit(1, )
diff --git a/pkg/front_end/parser_testcases/no-triple-shift/simple_attempted_usage_of_triple_shift.dart.intertwined.expect b/pkg/front_end/parser_testcases/no-triple-shift/simple_attempted_usage_of_triple_shift.dart.intertwined.expect
new file mode 100644
index 0000000..6db3700
--- /dev/null
+++ b/pkg/front_end/parser_testcases/no-triple-shift/simple_attempted_usage_of_triple_shift.dart.intertwined.expect
@@ -0,0 +1,130 @@
+parseUnit(void)
+ skipErrorTokens(void)
+ listener: beginCompilationUnit(void)
+ syntheticPreviousToken(void)
+ parseTopLevelDeclarationImpl(, Instance of 'DirectiveContext')
+ parseMetadataStar()
+ listener: beginMetadataStar(void)
+ listener: endMetadataStar(0)
+ parseTopLevelMemberImpl()
+ listener: beginTopLevelMember(void)
+ parseTopLevelMethod(, null, , Instance of 'VoidType', null, main, false)
+ listener: beginTopLevelMethod(, null)
+ listener: handleVoidKeyword(void)
+ ensureIdentifierPotentiallyRecovered(void, topLevelFunctionDeclaration, false)
+ listener: handleIdentifier(main, topLevelFunctionDeclaration)
+ parseMethodTypeVar(main)
+ listener: handleNoTypeVariables(()
+ parseGetterOrFormalParameters(main, main, false, MemberKind.TopLevelMethod)
+ parseFormalParameters(main, MemberKind.TopLevelMethod)
+ parseFormalParametersRest((, MemberKind.TopLevelMethod)
+ listener: beginFormalParameters((, MemberKind.TopLevelMethod)
+ parseFormalParameter((, FormalParameterKind.mandatory, MemberKind.TopLevelMethod)
+ parseMetadataStar(()
+ listener: beginMetadataStar(List)
+ listener: endMetadataStar(0)
+ listener: beginFormalParameter(List, MemberKind.TopLevelMethod, null, null, null)
+ listener: handleIdentifier(List, typeReference)
+ listener: beginTypeArguments(<)
+ listener: handleIdentifier(String, typeReference)
+ listener: handleNoTypeArguments(>)
+ listener: handleType(String, null)
+ listener: endTypeArguments(1, <, >)
+ listener: handleType(List, null)
+ ensureIdentifier(>, formalParameterDeclaration)
+ listener: handleIdentifier(arguments, formalParameterDeclaration)
+ listener: handleFormalParameterWithoutValue())
+ listener: endFormalParameter(null, null, arguments, null, null, FormalParameterKind.mandatory, MemberKind.TopLevelMethod)
+ listener: endFormalParameters(1, (, ), MemberKind.TopLevelMethod)
+ parseAsyncModifierOpt())
+ listener: handleAsyncModifier(null, null)
+ inPlainSync()
+ parseFunctionBody(), false, false)
+ listener: beginBlockFunctionBody({)
+ notEofOrValue(}, var)
+ parseStatement({)
+ parseStatementX({)
+ parseExpressionStatementOrDeclarationAfterModifiers(var, {, null, var, null, false)
+ looksLikeLocalFunction(x)
+ listener: beginMetadataStar(var)
+ listener: endMetadataStar(0)
+ listener: handleNoType(var)
+ listener: beginVariablesDeclaration(x, null, var)
+ parseVariablesDeclarationRest(var, true)
+ parseOptionallyInitializedIdentifier(var)
+ ensureIdentifier(var, localVariableDeclaration)
+ listener: handleIdentifier(x, localVariableDeclaration)
+ listener: beginInitializedIdentifier(x)
+ parseVariableInitializerOpt(x)
+ listener: beginVariableInitializer(=)
+ parseExpression(=)
+ parsePrecedenceExpression(=, 1, true)
+ parseUnaryExpression(=, true)
+ parsePrimary(=, expression)
+ parseLiteralInt(=)
+ listener: handleLiteralInt(10)
+ reportRecoverableErrorWithEnd(>>, >, Message[ExperimentNotEnabled, This requires the 'triple-shift' language feature to be enabled., Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'., {string: triple-shift, string2: 2.14}])
+ listener: handleRecoverableError(Message[ExperimentNotEnabled, This requires the 'triple-shift' language feature to be enabled., Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'., {string: triple-shift, string2: 2.14}], >>, >)
+ rewriter()
+ listener: beginBinaryExpression(>>>)
+ parsePrecedenceExpression(>>>, 13, true)
+ parseUnaryExpression(>>>, true)
+ parsePrimary(>>>, expression)
+ parseLiteralInt(>>>)
+ listener: handleLiteralInt(2)
+ listener: endBinaryExpression(>>>)
+ listener: endVariableInitializer(=)
+ listener: endInitializedIdentifier(x)
+ ensureSemicolon(2)
+ listener: endVariablesDeclaration(1, ;)
+ notEofOrValue(}, print)
+ parseStatement(;)
+ parseStatementX(;)
+ parseExpressionStatementOrDeclarationAfterModifiers(;, ;, null, null, null, false)
+ looksLikeLocalFunction(print)
+ parseExpressionStatement(;)
+ parseExpression(;)
+ parsePrecedenceExpression(;, 1, true)
+ parseUnaryExpression(;, true)
+ parsePrimary(;, expression)
+ parseSendOrFunctionLiteral(;, expression)
+ looksLikeFunctionBody(;)
+ parseSend(;, expression)
+ isNextIdentifier(;)
+ ensureIdentifier(;, expression)
+ listener: handleIdentifier(print, expression)
+ listener: handleNoTypeArguments(()
+ parseArgumentsOpt(print)
+ parseArguments(print)
+ parseArgumentsRest(()
+ listener: beginArguments(()
+ parseExpression(()
+ parsePrecedenceExpression((, 1, true)
+ parseUnaryExpression((, true)
+ parsePrimary((, expression)
+ parseLiteralString(()
+ parseSingleLiteralString(()
+ listener: beginLiteralString('x: )
+ parseIdentifierExpression($)
+ parseSend($, expression)
+ isNextIdentifier($)
+ ensureIdentifier($, expression)
+ listener: handleIdentifier(x, expression)
+ listener: handleNoTypeArguments(')
+ parseArgumentsOpt(x)
+ listener: handleNoArguments(')
+ listener: handleSend(x, ')
+ listener: handleInterpolationExpression($, null)
+ parseStringPart(x)
+ listener: handleStringPart(')
+ listener: endLiteralString(1, ))
+ listener: endArguments(1, (, ))
+ listener: handleSend(print, ;)
+ ensureSemicolon())
+ listener: handleExpressionStatement(;)
+ notEofOrValue(}, })
+ listener: endBlockFunctionBody(2, {, })
+ listener: endTopLevelMethod(void, null, })
+ listener: endTopLevelDeclaration()
+ reportAllErrorTokens(void)
+ listener: endCompilationUnit(1, )
diff --git a/pkg/front_end/parser_testcases/no-triple-shift/simple_attempted_usage_of_triple_shift.dart.parser.expect b/pkg/front_end/parser_testcases/no-triple-shift/simple_attempted_usage_of_triple_shift.dart.parser.expect
new file mode 100644
index 0000000..7249fbc
--- /dev/null
+++ b/pkg/front_end/parser_testcases/no-triple-shift/simple_attempted_usage_of_triple_shift.dart.parser.expect
@@ -0,0 +1,13 @@
+NOTICE: Stream was rewritten by parser!
+
+void main(List<String> arguments) {
+var x = 10 >>> 2;
+print('x: $x');
+}
+
+
+void[KeywordToken] main[StringToken]([BeginToken]List[StringToken]<[BeginToken]String[StringToken]>[SimpleToken] arguments[StringToken])[SimpleToken] {[BeginToken]
+var[KeywordToken] x[StringToken] =[SimpleToken] 10[StringToken] >>>[ReplacementToken] 2[StringToken];[SimpleToken]
+print[StringToken]([BeginToken]'x: [StringToken]$[SimpleToken]x[StringToken]'[StringToken])[SimpleToken];[SimpleToken]
+}[SimpleToken]
+[SimpleToken]
diff --git a/pkg/front_end/parser_testcases/no-triple-shift/simple_attempted_usage_of_triple_shift.dart.scanner.expect b/pkg/front_end/parser_testcases/no-triple-shift/simple_attempted_usage_of_triple_shift.dart.scanner.expect
new file mode 100644
index 0000000..6f63e7e
--- /dev/null
+++ b/pkg/front_end/parser_testcases/no-triple-shift/simple_attempted_usage_of_triple_shift.dart.scanner.expect
@@ -0,0 +1,11 @@
+void main(List<String> arguments) {
+var x = 10 >>> 2;
+print('x: $x');
+}
+
+
+void[KeywordToken] main[StringToken]([BeginToken]List[StringToken]<[BeginToken]String[StringToken]>[SimpleToken] arguments[StringToken])[SimpleToken] {[BeginToken]
+var[KeywordToken] x[StringToken] =[SimpleToken] 10[StringToken] >>[SimpleToken]>[SimpleToken] 2[StringToken];[SimpleToken]
+print[StringToken]([BeginToken]'x: [StringToken]$[SimpleToken]x[StringToken]'[StringToken])[SimpleToken];[SimpleToken]
+}[SimpleToken]
+[SimpleToken]
diff --git a/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_not_triple_shift.dart b/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_not_triple_shift.dart
new file mode 100644
index 0000000..bb5247d
--- /dev/null
+++ b/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_not_triple_shift.dart
@@ -0,0 +1,11 @@
+// From https://github.com/dart-lang/sdk/issues/46886
+extension on Symbol {
+ String operator >(_) => "Greater Than used";
+ String call(_) => "Called";
+}
+
+void main() {
+ print(#>>>(2));
+}
+
+abstract class Foo extends List<List<List<String>>> {}
diff --git a/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_not_triple_shift.dart.expect b/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_not_triple_shift.dart.expect
new file mode 100644
index 0000000..616d7b4
--- /dev/null
+++ b/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_not_triple_shift.dart.expect
@@ -0,0 +1,120 @@
+beginCompilationUnit(extension)
+ beginMetadataStar(extension)
+ endMetadataStar(0)
+ beginExtensionDeclarationPrelude(extension)
+ handleNoTypeVariables(on)
+ beginExtensionDeclaration(extension, null)
+ handleIdentifier(Symbol, typeReference)
+ handleNoTypeArguments({)
+ handleType(Symbol, null)
+ beginClassOrMixinBody(DeclarationKind.Extension, {)
+ beginMetadataStar(String)
+ endMetadataStar(0)
+ beginMember()
+ beginMethod(null, null, null, null, null, operator)
+ handleIdentifier(String, typeReference)
+ handleNoTypeArguments(operator)
+ handleType(String, null)
+ handleOperatorName(operator, >)
+ handleNoTypeVariables(()
+ beginFormalParameters((, MemberKind.ExtensionNonStaticMethod)
+ beginMetadataStar(_)
+ endMetadataStar(0)
+ beginFormalParameter(_, MemberKind.ExtensionNonStaticMethod, null, null, null)
+ handleNoType(()
+ handleIdentifier(_, formalParameterDeclaration)
+ handleFormalParameterWithoutValue())
+ endFormalParameter(null, null, _, null, null, FormalParameterKind.mandatory, MemberKind.ExtensionNonStaticMethod)
+ endFormalParameters(1, (, ), MemberKind.ExtensionNonStaticMethod)
+ handleNoInitializers()
+ handleAsyncModifier(null, null)
+ beginLiteralString("Greater Than used")
+ endLiteralString(0, ;)
+ handleExpressionFunctionBody(=>, ;)
+ endExtensionMethod(null, String, (, null, ;)
+ endMember()
+ beginMetadataStar(String)
+ endMetadataStar(0)
+ beginMember()
+ beginMethod(null, null, null, null, null, call)
+ handleIdentifier(String, typeReference)
+ handleNoTypeArguments(call)
+ handleType(String, null)
+ handleIdentifier(call, methodDeclaration)
+ handleNoTypeVariables(()
+ beginFormalParameters((, MemberKind.ExtensionNonStaticMethod)
+ beginMetadataStar(_)
+ endMetadataStar(0)
+ beginFormalParameter(_, MemberKind.ExtensionNonStaticMethod, null, null, null)
+ handleNoType(()
+ handleIdentifier(_, formalParameterDeclaration)
+ handleFormalParameterWithoutValue())
+ endFormalParameter(null, null, _, null, null, FormalParameterKind.mandatory, MemberKind.ExtensionNonStaticMethod)
+ endFormalParameters(1, (, ), MemberKind.ExtensionNonStaticMethod)
+ handleNoInitializers()
+ handleAsyncModifier(null, null)
+ beginLiteralString("Called")
+ endLiteralString(0, ;)
+ handleExpressionFunctionBody(=>, ;)
+ endExtensionMethod(null, String, (, null, ;)
+ endMember()
+ endClassOrMixinBody(DeclarationKind.Extension, 2, {, })
+ endExtensionDeclaration(extension, null, on, })
+ endTopLevelDeclaration(void)
+ beginMetadataStar(void)
+ endMetadataStar(0)
+ beginTopLevelMember(void)
+ beginTopLevelMethod(}, null)
+ handleVoidKeyword(void)
+ handleIdentifier(main, topLevelFunctionDeclaration)
+ handleNoTypeVariables(()
+ beginFormalParameters((, MemberKind.TopLevelMethod)
+ endFormalParameters(0, (, ), MemberKind.TopLevelMethod)
+ handleAsyncModifier(null, null)
+ beginBlockFunctionBody({)
+ handleIdentifier(print, expression)
+ handleNoTypeArguments(()
+ beginArguments(()
+ beginLiteralSymbol(#)
+ handleOperator(>>)
+ endLiteralSymbol(#, 1)
+ beginBinaryExpression(>)
+ handleLiteralInt(2)
+ handleParenthesizedExpression(()
+ endBinaryExpression(>)
+ endArguments(1, (, ))
+ handleSend(print, ;)
+ handleExpressionStatement(;)
+ endBlockFunctionBody(1, {, })
+ endTopLevelMethod(void, null, })
+ endTopLevelDeclaration(abstract)
+ beginMetadataStar(abstract)
+ endMetadataStar(0)
+ beginClassOrNamedMixinApplicationPrelude(abstract)
+ handleIdentifier(Foo, classOrMixinDeclaration)
+ handleNoTypeVariables(extends)
+ beginClassDeclaration(abstract, abstract, Foo)
+ handleIdentifier(List, typeReference)
+ beginTypeArguments(<)
+ handleIdentifier(List, typeReference)
+ beginTypeArguments(<)
+ handleIdentifier(List, typeReference)
+ beginTypeArguments(<)
+ handleIdentifier(String, typeReference)
+ handleNoTypeArguments(>)
+ handleType(String, null)
+ endTypeArguments(1, <, >)
+ handleType(List, null)
+ endTypeArguments(1, <, >)
+ handleType(List, null)
+ endTypeArguments(1, <, >)
+ handleType(List, null)
+ handleClassExtends(extends, 1)
+ handleClassNoWithClause()
+ handleClassOrMixinImplements(null, 0)
+ handleClassHeader(abstract, class, null)
+ beginClassOrMixinBody(DeclarationKind.Class, {)
+ endClassOrMixinBody(DeclarationKind.Class, 0, {, })
+ endClassDeclaration(abstract, })
+ endTopLevelDeclaration()
+endCompilationUnit(3, )
diff --git a/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_not_triple_shift.dart.intertwined.expect b/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_not_triple_shift.dart.intertwined.expect
new file mode 100644
index 0000000..aea9af2
--- /dev/null
+++ b/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_not_triple_shift.dart.intertwined.expect
@@ -0,0 +1,251 @@
+parseUnit(extension)
+ skipErrorTokens(extension)
+ listener: beginCompilationUnit(extension)
+ syntheticPreviousToken(extension)
+ parseTopLevelDeclarationImpl(, Instance of 'DirectiveContext')
+ parseMetadataStar()
+ listener: beginMetadataStar(extension)
+ listener: endMetadataStar(0)
+ parseTopLevelKeywordDeclaration(, extension, Instance of 'DirectiveContext')
+ parseTopLevelKeywordModifiers(, extension)
+ parseExtension(extension)
+ listener: beginExtensionDeclarationPrelude(extension)
+ listener: handleNoTypeVariables(on)
+ listener: beginExtensionDeclaration(extension, null)
+ listener: handleIdentifier(Symbol, typeReference)
+ listener: handleNoTypeArguments({)
+ listener: handleType(Symbol, null)
+ parseClassOrMixinOrExtensionBody(Symbol, DeclarationKind.Extension, null)
+ listener: beginClassOrMixinBody(DeclarationKind.Extension, {)
+ notEofOrValue(}, String)
+ parseClassOrMixinOrExtensionMemberImpl({, DeclarationKind.Extension, null)
+ parseMetadataStar({)
+ listener: beginMetadataStar(String)
+ listener: endMetadataStar(0)
+ listener: beginMember()
+ parseMethod({, null, null, null, null, null, null, {, Instance of 'SimpleType', null, operator, DeclarationKind.Extension, null, false)
+ listener: beginMethod(null, null, null, null, null, operator)
+ listener: handleIdentifier(String, typeReference)
+ listener: handleNoTypeArguments(operator)
+ listener: handleType(String, null)
+ parseOperatorName(String)
+ listener: handleOperatorName(operator, >)
+ parseMethodTypeVar(>)
+ listener: handleNoTypeVariables(()
+ parseGetterOrFormalParameters(>, operator, false, MemberKind.ExtensionNonStaticMethod)
+ parseFormalParameters(>, MemberKind.ExtensionNonStaticMethod)
+ parseFormalParametersRest((, MemberKind.ExtensionNonStaticMethod)
+ listener: beginFormalParameters((, MemberKind.ExtensionNonStaticMethod)
+ parseFormalParameter((, FormalParameterKind.mandatory, MemberKind.ExtensionNonStaticMethod)
+ parseMetadataStar(()
+ listener: beginMetadataStar(_)
+ listener: endMetadataStar(0)
+ listener: beginFormalParameter(_, MemberKind.ExtensionNonStaticMethod, null, null, null)
+ listener: handleNoType(()
+ ensureIdentifier((, formalParameterDeclaration)
+ listener: handleIdentifier(_, formalParameterDeclaration)
+ listener: handleFormalParameterWithoutValue())
+ listener: endFormalParameter(null, null, _, null, null, FormalParameterKind.mandatory, MemberKind.ExtensionNonStaticMethod)
+ listener: endFormalParameters(1, (, ), MemberKind.ExtensionNonStaticMethod)
+ parseInitializersOpt())
+ listener: handleNoInitializers()
+ parseAsyncModifierOpt())
+ listener: handleAsyncModifier(null, null)
+ inPlainSync()
+ inPlainSync()
+ parseFunctionBody(), false, true)
+ parseExpressionFunctionBody(=>, false)
+ parseExpression(=>)
+ parsePrecedenceExpression(=>, 1, true)
+ parseUnaryExpression(=>, true)
+ parsePrimary(=>, expression)
+ parseLiteralString(=>)
+ parseSingleLiteralString(=>)
+ listener: beginLiteralString("Greater Than used")
+ listener: endLiteralString(0, ;)
+ ensureSemicolon("Greater Than used")
+ listener: handleExpressionFunctionBody(=>, ;)
+ inGenerator()
+ listener: endExtensionMethod(null, String, (, null, ;)
+ listener: endMember()
+ notEofOrValue(}, String)
+ parseClassOrMixinOrExtensionMemberImpl(;, DeclarationKind.Extension, null)
+ parseMetadataStar(;)
+ listener: beginMetadataStar(String)
+ listener: endMetadataStar(0)
+ listener: beginMember()
+ parseMethod(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', null, call, DeclarationKind.Extension, null, false)
+ listener: beginMethod(null, null, null, null, null, call)
+ listener: handleIdentifier(String, typeReference)
+ listener: handleNoTypeArguments(call)
+ listener: handleType(String, null)
+ ensureIdentifierPotentiallyRecovered(String, methodDeclaration, false)
+ listener: handleIdentifier(call, methodDeclaration)
+ parseQualifiedRestOpt(call, methodDeclarationContinuation)
+ parseMethodTypeVar(call)
+ listener: handleNoTypeVariables(()
+ parseGetterOrFormalParameters(call, call, false, MemberKind.ExtensionNonStaticMethod)
+ parseFormalParameters(call, MemberKind.ExtensionNonStaticMethod)
+ parseFormalParametersRest((, MemberKind.ExtensionNonStaticMethod)
+ listener: beginFormalParameters((, MemberKind.ExtensionNonStaticMethod)
+ parseFormalParameter((, FormalParameterKind.mandatory, MemberKind.ExtensionNonStaticMethod)
+ parseMetadataStar(()
+ listener: beginMetadataStar(_)
+ listener: endMetadataStar(0)
+ listener: beginFormalParameter(_, MemberKind.ExtensionNonStaticMethod, null, null, null)
+ listener: handleNoType(()
+ ensureIdentifier((, formalParameterDeclaration)
+ listener: handleIdentifier(_, formalParameterDeclaration)
+ listener: handleFormalParameterWithoutValue())
+ listener: endFormalParameter(null, null, _, null, null, FormalParameterKind.mandatory, MemberKind.ExtensionNonStaticMethod)
+ listener: endFormalParameters(1, (, ), MemberKind.ExtensionNonStaticMethod)
+ parseInitializersOpt())
+ listener: handleNoInitializers()
+ parseAsyncModifierOpt())
+ listener: handleAsyncModifier(null, null)
+ inPlainSync()
+ inPlainSync()
+ parseFunctionBody(), false, true)
+ parseExpressionFunctionBody(=>, false)
+ parseExpression(=>)
+ parsePrecedenceExpression(=>, 1, true)
+ parseUnaryExpression(=>, true)
+ parsePrimary(=>, expression)
+ parseLiteralString(=>)
+ parseSingleLiteralString(=>)
+ listener: beginLiteralString("Called")
+ listener: endLiteralString(0, ;)
+ ensureSemicolon("Called")
+ listener: handleExpressionFunctionBody(=>, ;)
+ inGenerator()
+ listener: endExtensionMethod(null, String, (, null, ;)
+ listener: endMember()
+ notEofOrValue(}, })
+ listener: endClassOrMixinBody(DeclarationKind.Extension, 2, {, })
+ listener: endExtensionDeclaration(extension, null, on, })
+ listener: endTopLevelDeclaration(void)
+ parseTopLevelDeclarationImpl(}, Instance of 'DirectiveContext')
+ parseMetadataStar(})
+ listener: beginMetadataStar(void)
+ listener: endMetadataStar(0)
+ parseTopLevelMemberImpl(})
+ listener: beginTopLevelMember(void)
+ parseTopLevelMethod(}, null, }, Instance of 'VoidType', null, main, false)
+ listener: beginTopLevelMethod(}, null)
+ listener: handleVoidKeyword(void)
+ ensureIdentifierPotentiallyRecovered(void, topLevelFunctionDeclaration, false)
+ listener: handleIdentifier(main, topLevelFunctionDeclaration)
+ parseMethodTypeVar(main)
+ listener: handleNoTypeVariables(()
+ parseGetterOrFormalParameters(main, main, false, MemberKind.TopLevelMethod)
+ parseFormalParameters(main, MemberKind.TopLevelMethod)
+ parseFormalParametersRest((, MemberKind.TopLevelMethod)
+ listener: beginFormalParameters((, MemberKind.TopLevelMethod)
+ listener: endFormalParameters(0, (, ), MemberKind.TopLevelMethod)
+ parseAsyncModifierOpt())
+ listener: handleAsyncModifier(null, null)
+ inPlainSync()
+ parseFunctionBody(), false, false)
+ listener: beginBlockFunctionBody({)
+ notEofOrValue(}, print)
+ parseStatement({)
+ parseStatementX({)
+ parseExpressionStatementOrDeclarationAfterModifiers({, {, null, null, null, false)
+ looksLikeLocalFunction(print)
+ parseExpressionStatement({)
+ parseExpression({)
+ parsePrecedenceExpression({, 1, true)
+ parseUnaryExpression({, true)
+ parsePrimary({, expression)
+ parseSendOrFunctionLiteral({, expression)
+ looksLikeFunctionBody(;)
+ parseSend({, expression)
+ isNextIdentifier({)
+ ensureIdentifier({, expression)
+ listener: handleIdentifier(print, expression)
+ listener: handleNoTypeArguments(()
+ parseArgumentsOpt(print)
+ parseArguments(print)
+ parseArgumentsRest(()
+ listener: beginArguments(()
+ parseExpression(()
+ parsePrecedenceExpression((, 1, true)
+ parseUnaryExpression((, true)
+ parsePrimary((, expression)
+ parseLiteralSymbol(()
+ listener: beginLiteralSymbol(#)
+ listener: handleOperator(>>)
+ listener: endLiteralSymbol(#, 1)
+ listener: beginBinaryExpression(>)
+ parsePrecedenceExpression(>, 9, true)
+ parseUnaryExpression(>, true)
+ parsePrimary(>, expression)
+ parseParenthesizedExpressionOrFunctionLiteral(>)
+ parseParenthesizedExpression(>)
+ parseExpressionInParenthesis(>)
+ parseExpressionInParenthesisRest(()
+ parseExpression(()
+ parsePrecedenceExpression((, 1, true)
+ parseUnaryExpression((, true)
+ parsePrimary((, expression)
+ parseLiteralInt(()
+ listener: handleLiteralInt(2)
+ ensureCloseParen(2, ()
+ listener: handleParenthesizedExpression(()
+ listener: endBinaryExpression(>)
+ listener: endArguments(1, (, ))
+ listener: handleSend(print, ;)
+ ensureSemicolon())
+ listener: handleExpressionStatement(;)
+ notEofOrValue(}, })
+ listener: endBlockFunctionBody(1, {, })
+ listener: endTopLevelMethod(void, null, })
+ listener: endTopLevelDeclaration(abstract)
+ parseTopLevelDeclarationImpl(}, Instance of 'DirectiveContext')
+ parseMetadataStar(})
+ listener: beginMetadataStar(abstract)
+ listener: endMetadataStar(0)
+ parseTopLevelKeywordDeclaration(}, class, Instance of 'DirectiveContext')
+ parseClassDeclarationModifiers(}, class)
+ parseTopLevelKeywordModifiers(abstract, class)
+ parseClassOrNamedMixinApplication(abstract, class)
+ listener: beginClassOrNamedMixinApplicationPrelude(abstract)
+ ensureIdentifier(class, classOrMixinDeclaration)
+ listener: handleIdentifier(Foo, classOrMixinDeclaration)
+ listener: handleNoTypeVariables(extends)
+ listener: beginClassDeclaration(abstract, abstract, Foo)
+ parseClass(Foo, abstract, class, Foo)
+ parseClassHeaderOpt(Foo, abstract, class)
+ parseClassExtendsOpt(Foo)
+ parseClassExtendsSeenExtendsClause(extends, Foo)
+ ensureIdentifier(extends, typeReference)
+ listener: handleIdentifier(List, typeReference)
+ listener: beginTypeArguments(<)
+ ensureIdentifier(<, typeReference)
+ listener: handleIdentifier(List, typeReference)
+ listener: beginTypeArguments(<)
+ listener: handleIdentifier(List, typeReference)
+ listener: beginTypeArguments(<)
+ listener: handleIdentifier(String, typeReference)
+ listener: handleNoTypeArguments(>)
+ listener: handleType(String, null)
+ listener: endTypeArguments(1, <, >)
+ listener: handleType(List, null)
+ listener: endTypeArguments(1, <, >)
+ listener: handleType(List, null)
+ listener: endTypeArguments(1, <, >)
+ listener: handleType(List, null)
+ listener: handleClassExtends(extends, 1)
+ parseWithClauseOpt(>)
+ listener: handleClassNoWithClause()
+ parseClassOrMixinImplementsOpt(>)
+ listener: handleClassOrMixinImplements(null, 0)
+ listener: handleClassHeader(abstract, class, null)
+ parseClassOrMixinOrExtensionBody(>, DeclarationKind.Class, Foo)
+ listener: beginClassOrMixinBody(DeclarationKind.Class, {)
+ notEofOrValue(}, })
+ listener: endClassOrMixinBody(DeclarationKind.Class, 0, {, })
+ listener: endClassDeclaration(abstract, })
+ listener: endTopLevelDeclaration()
+ reportAllErrorTokens(extension)
+ listener: endCompilationUnit(3, )
diff --git a/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_not_triple_shift.dart.parser.expect b/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_not_triple_shift.dart.parser.expect
new file mode 100644
index 0000000..94cc726
--- /dev/null
+++ b/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_not_triple_shift.dart.parser.expect
@@ -0,0 +1,25 @@
+NOTICE: Stream was rewritten by parser!
+
+extension on Symbol {
+String operator >(_) => "Greater Than used";
+String call(_) => "Called";
+}
+
+void main() {
+print(#>>>(2));
+}
+
+abstract class Foo extends List<List<List<String>>> {}
+
+
+extension[KeywordToken] on[KeywordToken] Symbol[StringToken] {[BeginToken]
+String[StringToken] operator[KeywordToken] >[SimpleToken]([BeginToken]_[StringToken])[SimpleToken] =>[SimpleToken] "Greater Than used"[StringToken];[SimpleToken]
+String[StringToken] call[StringToken]([BeginToken]_[StringToken])[SimpleToken] =>[SimpleToken] "Called"[StringToken];[SimpleToken]
+}[SimpleToken]
+
+void[KeywordToken] main[StringToken]([BeginToken])[SimpleToken] {[BeginToken]
+print[StringToken]([BeginToken]#[SimpleToken]>>[SimpleToken]>[SimpleToken]([BeginToken]2[StringToken])[SimpleToken])[SimpleToken];[SimpleToken]
+}[SimpleToken]
+
+abstract[KeywordToken] class[KeywordToken] Foo[StringToken] extends[KeywordToken] List[StringToken]<[BeginToken]List[StringToken]<[BeginToken]List[StringToken]<[BeginToken]String[StringToken]>[SimpleToken]>[SimpleToken]>[SimpleToken] {[BeginToken]}[SimpleToken]
+[SimpleToken]
diff --git a/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_not_triple_shift.dart.scanner.expect b/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_not_triple_shift.dart.scanner.expect
new file mode 100644
index 0000000..a0d2fdf
--- /dev/null
+++ b/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_not_triple_shift.dart.scanner.expect
@@ -0,0 +1,23 @@
+extension on Symbol {
+String operator >(_) => "Greater Than used";
+String call(_) => "Called";
+}
+
+void main() {
+print(#>>>(2));
+}
+
+abstract class Foo extends List<List<List<String>>> {}
+
+
+extension[KeywordToken] on[KeywordToken] Symbol[StringToken] {[BeginToken]
+String[StringToken] operator[KeywordToken] >[SimpleToken]([BeginToken]_[StringToken])[SimpleToken] =>[SimpleToken] "Greater Than used"[StringToken];[SimpleToken]
+String[StringToken] call[StringToken]([BeginToken]_[StringToken])[SimpleToken] =>[SimpleToken] "Called"[StringToken];[SimpleToken]
+}[SimpleToken]
+
+void[KeywordToken] main[StringToken]([BeginToken])[SimpleToken] {[BeginToken]
+print[StringToken]([BeginToken]#[SimpleToken]>>[SimpleToken]>[SimpleToken]([BeginToken]2[StringToken])[SimpleToken])[SimpleToken];[SimpleToken]
+}[SimpleToken]
+
+abstract[KeywordToken] class[KeywordToken] Foo[StringToken] extends[KeywordToken] List[StringToken]<[BeginToken]List[StringToken]<[BeginToken]List[StringToken]<[BeginToken]String[StringToken]>>[SimpleToken]>[SimpleToken] {[BeginToken]}[SimpleToken]
+[SimpleToken]
diff --git a/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_symbol.dart b/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_symbol.dart
new file mode 100644
index 0000000..a2b84b0
--- /dev/null
+++ b/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_symbol.dart
@@ -0,0 +1,3 @@
+main() {
+ print(#>>>);
+}
diff --git a/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_symbol.dart.expect b/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_symbol.dart.expect
new file mode 100644
index 0000000..0b9ca1d
--- /dev/null
+++ b/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_symbol.dart.expect
@@ -0,0 +1,38 @@
+Problems reported:
+
+parser/no-triple-shift/triple_shift_symbol:2:13: Expected an identifier, but got ')'.
+ print(#>>>);
+ ^
+
+beginCompilationUnit(main)
+ beginMetadataStar(main)
+ endMetadataStar(0)
+ beginTopLevelMember(main)
+ beginTopLevelMethod(, null)
+ handleNoType()
+ handleIdentifier(main, topLevelFunctionDeclaration)
+ handleNoTypeVariables(()
+ beginFormalParameters((, MemberKind.TopLevelMethod)
+ endFormalParameters(0, (, ), MemberKind.TopLevelMethod)
+ handleAsyncModifier(null, null)
+ beginBlockFunctionBody({)
+ handleIdentifier(print, expression)
+ handleNoTypeArguments(()
+ beginArguments(()
+ beginLiteralSymbol(#)
+ handleOperator(>>)
+ endLiteralSymbol(#, 1)
+ beginBinaryExpression(>)
+ handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got ')'., Try inserting an identifier before ')'., {lexeme: )}], ), ))
+ handleIdentifier(, expression)
+ handleNoTypeArguments())
+ handleNoArguments())
+ handleSend(, ))
+ endBinaryExpression(>)
+ endArguments(1, (, ))
+ handleSend(print, ;)
+ handleExpressionStatement(;)
+ endBlockFunctionBody(1, {, })
+ endTopLevelMethod(main, null, })
+ endTopLevelDeclaration()
+endCompilationUnit(1, )
diff --git a/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_symbol.dart.intertwined.expect b/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_symbol.dart.intertwined.expect
new file mode 100644
index 0000000..9a4f6ba
--- /dev/null
+++ b/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_symbol.dart.intertwined.expect
@@ -0,0 +1,83 @@
+parseUnit(main)
+ skipErrorTokens(main)
+ listener: beginCompilationUnit(main)
+ syntheticPreviousToken(main)
+ parseTopLevelDeclarationImpl(, Instance of 'DirectiveContext')
+ parseMetadataStar()
+ listener: beginMetadataStar(main)
+ listener: endMetadataStar(0)
+ parseTopLevelMemberImpl()
+ listener: beginTopLevelMember(main)
+ isReservedKeyword(()
+ parseTopLevelMethod(, null, , Instance of 'NoType', null, main, false)
+ listener: beginTopLevelMethod(, null)
+ listener: handleNoType()
+ ensureIdentifierPotentiallyRecovered(, topLevelFunctionDeclaration, false)
+ listener: handleIdentifier(main, topLevelFunctionDeclaration)
+ parseMethodTypeVar(main)
+ listener: handleNoTypeVariables(()
+ parseGetterOrFormalParameters(main, main, false, MemberKind.TopLevelMethod)
+ parseFormalParameters(main, MemberKind.TopLevelMethod)
+ parseFormalParametersRest((, MemberKind.TopLevelMethod)
+ listener: beginFormalParameters((, MemberKind.TopLevelMethod)
+ listener: endFormalParameters(0, (, ), MemberKind.TopLevelMethod)
+ parseAsyncModifierOpt())
+ listener: handleAsyncModifier(null, null)
+ inPlainSync()
+ parseFunctionBody(), false, false)
+ listener: beginBlockFunctionBody({)
+ notEofOrValue(}, print)
+ parseStatement({)
+ parseStatementX({)
+ parseExpressionStatementOrDeclarationAfterModifiers({, {, null, null, null, false)
+ looksLikeLocalFunction(print)
+ parseExpressionStatement({)
+ parseExpression({)
+ parsePrecedenceExpression({, 1, true)
+ parseUnaryExpression({, true)
+ parsePrimary({, expression)
+ parseSendOrFunctionLiteral({, expression)
+ looksLikeFunctionBody(;)
+ parseSend({, expression)
+ isNextIdentifier({)
+ ensureIdentifier({, expression)
+ listener: handleIdentifier(print, expression)
+ listener: handleNoTypeArguments(()
+ parseArgumentsOpt(print)
+ parseArguments(print)
+ parseArgumentsRest(()
+ listener: beginArguments(()
+ parseExpression(()
+ parsePrecedenceExpression((, 1, true)
+ parseUnaryExpression((, true)
+ parsePrimary((, expression)
+ parseLiteralSymbol(()
+ listener: beginLiteralSymbol(#)
+ listener: handleOperator(>>)
+ listener: endLiteralSymbol(#, 1)
+ listener: beginBinaryExpression(>)
+ parsePrecedenceExpression(>, 9, true)
+ parseUnaryExpression(>, true)
+ parsePrimary(>, expression)
+ parseSend(>, expression)
+ isNextIdentifier(>)
+ ensureIdentifier(>, expression)
+ reportRecoverableErrorWithToken(), Instance of 'Template<(Token) => Message>')
+ listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got ')'., Try inserting an identifier before ')'., {lexeme: )}], ), ))
+ rewriter()
+ listener: handleIdentifier(, expression)
+ listener: handleNoTypeArguments())
+ parseArgumentsOpt()
+ listener: handleNoArguments())
+ listener: handleSend(, ))
+ listener: endBinaryExpression(>)
+ listener: endArguments(1, (, ))
+ listener: handleSend(print, ;)
+ ensureSemicolon())
+ listener: handleExpressionStatement(;)
+ notEofOrValue(}, })
+ listener: endBlockFunctionBody(1, {, })
+ listener: endTopLevelMethod(main, null, })
+ listener: endTopLevelDeclaration()
+ reportAllErrorTokens(main)
+ listener: endCompilationUnit(1, )
diff --git a/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_symbol.dart.parser.expect b/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_symbol.dart.parser.expect
new file mode 100644
index 0000000..b608049
--- /dev/null
+++ b/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_symbol.dart.parser.expect
@@ -0,0 +1,11 @@
+NOTICE: Stream was rewritten by parser!
+
+main() {
+print(#>>>*synthetic*);
+}
+
+
+main[StringToken]([BeginToken])[SimpleToken] {[BeginToken]
+print[StringToken]([BeginToken]#[SimpleToken]>>[SimpleToken]>[SimpleToken][SyntheticStringToken])[SimpleToken];[SimpleToken]
+}[SimpleToken]
+[SimpleToken]
diff --git a/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_symbol.dart.scanner.expect b/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_symbol.dart.scanner.expect
new file mode 100644
index 0000000..604d5d7
--- /dev/null
+++ b/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_symbol.dart.scanner.expect
@@ -0,0 +1,9 @@
+main() {
+print(#>>>);
+}
+
+
+main[StringToken]([BeginToken])[SimpleToken] {[BeginToken]
+print[StringToken]([BeginToken]#[SimpleToken]>>[SimpleToken]>[SimpleToken])[SimpleToken];[SimpleToken]
+}[SimpleToken]
+[SimpleToken]
diff --git a/pkg/front_end/test/fasta/parser/token_stream_rewriter_test.dart b/pkg/front_end/test/fasta/parser/token_stream_rewriter_test.dart
index 3d26339..713d142 100644
--- a/pkg/front_end/test/fasta/parser/token_stream_rewriter_test.dart
+++ b/pkg/front_end/test/fasta/parser/token_stream_rewriter_test.dart
@@ -207,6 +207,58 @@
normalTestDone(rewriter, a);
}
+ void test_replaceNextTokensWithSyntheticToken_1() {
+ Token a = _makeToken(0, 'a');
+ StringToken b = _makeToken(5, 'b');
+ b.precedingComments = new CommentToken.fromSubstring(
+ TokenType.SINGLE_LINE_COMMENT, "Test comment", 1, 9, 1,
+ canonicalize: true);
+ Token c = _makeToken(10, 'c');
+ Token d = _makeToken(11, 'd');
+ Token e = _makeToken(12, 'e');
+ _link([a, b, c, d, e]);
+ setupDone(a);
+
+ TokenStreamRewriter rewriter = getTokenStreamRewriter();
+ ReplacementToken replacement = rewriter
+ .replaceNextTokensWithSyntheticToken(a, 3, TokenType.AMPERSAND);
+ expect(b.offset, same(replacement.offset));
+ expect(b.precedingComments, same(replacement.precedingComments));
+ expect(replacement.replacedToken, same(b));
+ expect(replacement.replacedToken.next, same(c));
+ expect(replacement.replacedToken.next.next, same(d));
+
+ expect(a.next, same(replacement));
+ expect(replacement.next, same(e));
+ expect(e.next.isEof, true);
+
+ normalTestDone(rewriter, a);
+ }
+
+ void test_replaceNextTokensWithSyntheticToken_2() {
+ Token a = _makeToken(0, 'a');
+ StringToken b = _makeToken(5, 'b');
+ b.precedingComments = new CommentToken.fromSubstring(
+ TokenType.SINGLE_LINE_COMMENT, "Test comment", 1, 9, 1,
+ canonicalize: true);
+ Token c = _makeToken(10, 'c');
+ _link([a, b, c]);
+ setupDone(a);
+
+ TokenStreamRewriter rewriter = getTokenStreamRewriter();
+ ReplacementToken replacement = rewriter
+ .replaceNextTokensWithSyntheticToken(a, 2, TokenType.AMPERSAND);
+ expect(b.offset, same(replacement.offset));
+ expect(b.precedingComments, same(replacement.precedingComments));
+ expect(replacement.replacedToken, same(b));
+ expect(replacement.replacedToken.next, same(c));
+
+ expect(a.next, same(replacement));
+ expect(replacement.next.isEof, true);
+
+ normalTestDone(rewriter, a);
+ }
+
void test_moveSynthetic() {
ScannerResult scanResult = scanString('Foo(bar; baz=0;');
expect(scanResult.hasErrors, isTrue);
diff --git a/pkg/front_end/test/parser_suite.dart b/pkg/front_end/test/parser_suite.dart
index f415263..86afab8 100644
--- a/pkg/front_end/test/parser_suite.dart
+++ b/pkg/front_end/test/parser_suite.dart
@@ -95,6 +95,12 @@
enableExtensionMethods: true,
enableNonNullable: false);
+ScannerConfiguration scannerConfigurationNonTripleShift =
+ new ScannerConfiguration(
+ enableTripleShift: false,
+ enableExtensionMethods: true,
+ enableNonNullable: true);
+
class Context extends ChainContext with MatchContext {
final bool updateExpectations;
@@ -407,6 +413,8 @@
String firstDir = shortName.split("/")[0];
if (firstDir == "non-nnbd") {
config = scannerConfigurationNonNNBD;
+ } else if (firstDir == "no-triple-shift") {
+ config = scannerConfigurationNonTripleShift;
} else {
config = scannerConfiguration;
}
diff --git a/pkg/front_end/testcases/general/issue_46886.dart b/pkg/front_end/testcases/general/issue_46886.dart
new file mode 100644
index 0000000..16425ef
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_46886.dart
@@ -0,0 +1,32 @@
+// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// @dart=2.13
+
+class Foo {
+ Foo operator >>>(_) => this;
+}
+
+extension on Symbol {
+ String operator >(_) => "Greater Than used";
+ String call(_) => "Called";
+}
+
+abstract class Bar implements List<List<List<String>>> {}
+
+main() {
+ Foo foo = new Foo();
+ foo >>> 42;
+ print(foo >>> 42);
+ print(foo >>>= 42);
+ if ((foo >>>= 42) == foo) {
+ print("same");
+ }
+
+ print(#>>>(2));
+ print(#>>>);
+
+ var x = 10 >>> 2;
+ print('x: $x');
+}
diff --git a/pkg/front_end/testcases/general/issue_46886.dart.textual_outline.expect b/pkg/front_end/testcases/general/issue_46886.dart.textual_outline.expect
new file mode 100644
index 0000000..8d133e3
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_46886.dart.textual_outline.expect
@@ -0,0 +1,13 @@
+// @dart = 2.13
+class Foo {
+ Foo operator >>>(_) => this;
+}
+
+extension on Symbol {
+ String operator >(_) => "Greater Than used";
+ String call(_) => "Called";
+}
+
+abstract class Bar implements List<List<List<String>>> {}
+
+main() {}
diff --git a/pkg/front_end/testcases/general/issue_46886.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/issue_46886.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..dab65d1
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_46886.dart.textual_outline_modelled.expect
@@ -0,0 +1,13 @@
+// @dart = 2.13
+abstract class Bar implements List<List<List<String>>> {}
+
+class Foo {
+ Foo operator >>>(_) => this;
+}
+
+extension on Symbol {
+ String call(_) => "Called";
+ String operator >(_) => "Greater Than used";
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/general/issue_46886.dart.weak.expect b/pkg/front_end/testcases/general/issue_46886.dart.weak.expect
new file mode 100644
index 0000000..e64cce5
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_46886.dart.weak.expect
@@ -0,0 +1,84 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/issue_46886.dart:8:16: Error: This requires the 'triple-shift' language feature to be enabled.
+// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'.
+// Foo operator >>>(_) => this;
+// ^^^
+//
+// pkg/front_end/testcases/general/issue_46886.dart:20:7: Error: This requires the 'triple-shift' language feature to be enabled.
+// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'.
+// foo >>> 42;
+// ^^^
+//
+// pkg/front_end/testcases/general/issue_46886.dart:21:13: Error: This requires the 'triple-shift' language feature to be enabled.
+// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'.
+// print(foo >>> 42);
+// ^^^
+//
+// pkg/front_end/testcases/general/issue_46886.dart:22:13: Error: This requires the 'triple-shift' language feature to be enabled.
+// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'.
+// print(foo >>>= 42);
+// ^^^^
+//
+// pkg/front_end/testcases/general/issue_46886.dart:23:12: Error: This requires the 'triple-shift' language feature to be enabled.
+// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'.
+// if ((foo >>>= 42) == foo) {
+// ^^^^
+//
+// pkg/front_end/testcases/general/issue_46886.dart:28:13: Error: Expected an identifier, but got ')'.
+// Try inserting an identifier before ')'.
+// print(#>>>);
+// ^
+//
+// pkg/front_end/testcases/general/issue_46886.dart:30:14: Error: This requires the 'triple-shift' language feature to be enabled.
+// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'.
+// var x = 10 >>> 2;
+// ^^^
+//
+import self as self;
+import "dart:core" as core;
+
+class Foo extends core::Object {
+ synthetic constructor •() → self::Foo
+ : super core::Object::•()
+ ;
+ operator >>>(dynamic _) → self::Foo
+ return this;
+}
+abstract class Bar extends core::Object implements core::List<core::List<core::List<core::String>>> {
+ synthetic constructor •() → self::Bar
+ : super core::Object::•()
+ ;
+}
+extension _extension#0 on core::Symbol {
+ operator > = self::_extension#0|>;
+ method call = self::_extension#0|call;
+ tearoff call = self::_extension#0|get#call;
+}
+static method _extension#0|>(lowered final core::Symbol #this, dynamic _) → core::String
+ return "Greater Than used";
+static method _extension#0|call(lowered final core::Symbol #this, dynamic _) → core::String
+ return "Called";
+static method _extension#0|get#call(lowered final core::Symbol #this) → (dynamic) → core::String
+ return (dynamic _) → core::String => self::_extension#0|call(#this, _);
+static method main() → dynamic {
+ self::Foo foo = new self::Foo::•();
+ foo.{self::Foo::>>>}(42){(dynamic) → self::Foo};
+ core::print(foo.{self::Foo::>>>}(42){(dynamic) → self::Foo});
+ core::print(foo = foo.{self::Foo::>>>}(42){(dynamic) → self::Foo});
+ if((foo = foo.{self::Foo::>>>}(42){(dynamic) → self::Foo}) =={core::Object::==}{(core::Object) → core::bool} foo) {
+ core::print("same");
+ }
+ core::print(self::_extension#0|>(#C1, 2));
+ core::print(self::_extension#0|>(#C1, invalid-expression "pkg/front_end/testcases/general/issue_46886.dart:28:13: Error: This couldn't be parsed.
+ print(#>>>);
+ ^"));
+ core::int x = 10.{core::int::>>>}(2){(core::int) → core::int};
+ core::print("x: ${x}");
+}
+
+constants {
+ #C1 = #>>
+}
diff --git a/pkg/front_end/testcases/general/issue_46886.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue_46886.dart.weak.outline.expect
new file mode 100644
index 0000000..73a7e48
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_46886.dart.weak.outline.expect
@@ -0,0 +1,35 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/issue_46886.dart:8:16: Error: This requires the 'triple-shift' language feature to be enabled.
+// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'.
+// Foo operator >>>(_) => this;
+// ^^^
+//
+import self as self;
+import "dart:core" as core;
+
+class Foo extends core::Object {
+ synthetic constructor •() → self::Foo
+ ;
+ operator >>>(dynamic _) → self::Foo
+ ;
+}
+abstract class Bar extends core::Object implements core::List<core::List<core::List<core::String>>> {
+ synthetic constructor •() → self::Bar
+ ;
+}
+extension _extension#0 on core::Symbol {
+ operator > = self::_extension#0|>;
+ method call = self::_extension#0|call;
+ tearoff call = self::_extension#0|get#call;
+}
+static method _extension#0|>(lowered final core::Symbol #this, dynamic _) → core::String
+ ;
+static method _extension#0|call(lowered final core::Symbol #this, dynamic _) → core::String
+ ;
+static method _extension#0|get#call(lowered final core::Symbol #this) → (dynamic) → core::String
+ return (dynamic _) → core::String => self::_extension#0|call(#this, _);
+static method main() → dynamic
+ ;
diff --git a/pkg/front_end/testcases/general/issue_46886.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue_46886.dart.weak.transformed.expect
new file mode 100644
index 0000000..ab49a67
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_46886.dart.weak.transformed.expect
@@ -0,0 +1,88 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/issue_46886.dart:8:16: Error: This requires the 'triple-shift' language feature to be enabled.
+// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'.
+// Foo operator >>>(_) => this;
+// ^^^
+//
+// pkg/front_end/testcases/general/issue_46886.dart:20:7: Error: This requires the 'triple-shift' language feature to be enabled.
+// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'.
+// foo >>> 42;
+// ^^^
+//
+// pkg/front_end/testcases/general/issue_46886.dart:21:13: Error: This requires the 'triple-shift' language feature to be enabled.
+// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'.
+// print(foo >>> 42);
+// ^^^
+//
+// pkg/front_end/testcases/general/issue_46886.dart:22:13: Error: This requires the 'triple-shift' language feature to be enabled.
+// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'.
+// print(foo >>>= 42);
+// ^^^^
+//
+// pkg/front_end/testcases/general/issue_46886.dart:23:12: Error: This requires the 'triple-shift' language feature to be enabled.
+// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'.
+// if ((foo >>>= 42) == foo) {
+// ^^^^
+//
+// pkg/front_end/testcases/general/issue_46886.dart:28:13: Error: Expected an identifier, but got ')'.
+// Try inserting an identifier before ')'.
+// print(#>>>);
+// ^
+//
+// pkg/front_end/testcases/general/issue_46886.dart:30:14: Error: This requires the 'triple-shift' language feature to be enabled.
+// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'.
+// var x = 10 >>> 2;
+// ^^^
+//
+import self as self;
+import "dart:core" as core;
+
+class Foo extends core::Object {
+ synthetic constructor •() → self::Foo
+ : super core::Object::•()
+ ;
+ operator >>>(dynamic _) → self::Foo
+ return this;
+}
+abstract class Bar extends core::Object implements core::List<core::List<core::List<core::String>>> {
+ synthetic constructor •() → self::Bar
+ : super core::Object::•()
+ ;
+}
+extension _extension#0 on core::Symbol {
+ operator > = self::_extension#0|>;
+ method call = self::_extension#0|call;
+ tearoff call = self::_extension#0|get#call;
+}
+static method _extension#0|>(lowered final core::Symbol #this, dynamic _) → core::String
+ return "Greater Than used";
+static method _extension#0|call(lowered final core::Symbol #this, dynamic _) → core::String
+ return "Called";
+static method _extension#0|get#call(lowered final core::Symbol #this) → (dynamic) → core::String
+ return (dynamic _) → core::String => self::_extension#0|call(#this, _);
+static method main() → dynamic {
+ self::Foo foo = new self::Foo::•();
+ foo.{self::Foo::>>>}(42){(dynamic) → self::Foo};
+ core::print(foo.{self::Foo::>>>}(42){(dynamic) → self::Foo});
+ core::print(foo = foo.{self::Foo::>>>}(42){(dynamic) → self::Foo});
+ if((foo = foo.{self::Foo::>>>}(42){(dynamic) → self::Foo}) =={core::Object::==}{(core::Object) → core::bool} foo) {
+ core::print("same");
+ }
+ core::print(self::_extension#0|>(#C1, 2));
+ core::print(self::_extension#0|>(#C1, invalid-expression "pkg/front_end/testcases/general/issue_46886.dart:28:13: Error: This couldn't be parsed.
+ print(#>>>);
+ ^"));
+ core::int x = 10.{core::int::>>>}(2){(core::int) → core::int};
+ core::print("x: ${x}");
+}
+
+constants {
+ #C1 = #>>
+}
+
+Extra constant evaluation status:
+Evaluated: InstanceInvocation @ org-dartlang-testcase:///issue_46886.dart:30:14 -> IntConstant(2)
+Extra constant evaluation: evaluated: 29, effectively constant: 1
diff --git a/pkg/front_end/testcases/text_serialization.status b/pkg/front_end/testcases/text_serialization.status
index 7ea4ce0..1f53d6b 100644
--- a/pkg/front_end/testcases/text_serialization.status
+++ b/pkg/front_end/testcases/text_serialization.status
@@ -88,6 +88,7 @@
general/issue41210b/issue41210: TypeCheckError
general/issue44733: TypeCheckError
general/issue45204: TypeCheckError
+general/issue_46886: RuntimeError
general/micro: RuntimeError
general/mixin_application_override: TypeCheckError
general/mixin_constructors_with_default_values: RuntimeError
diff --git a/pkg/front_end/testcases/triple_shift/invalid_operator.dart.textual_outline.expect b/pkg/front_end/testcases/triple_shift/invalid_operator.dart.textual_outline.expect
index a449983..7faa576 100644
--- a/pkg/front_end/testcases/triple_shift/invalid_operator.dart.textual_outline.expect
+++ b/pkg/front_end/testcases/triple_shift/invalid_operator.dart.textual_outline.expect
@@ -1,29 +1,22 @@
class Operators1 {
- operator >>(){}
- operator>() => true;
+ operator >>> () => true;
}
class Operators2 {
- operator >>(){}
- operator>(a, b) => true;
+ operator >>> (a, b) => true;
}
class Operators3 {
- operator >>(){}
- operator>([a]) => true;
+ operator >>> ([a]) => true;
}
class Operators4 {
- operator >>(){}
- operator>({a}) => true;
+ operator >>> ({a}) => true;
}
class Operators5 {
- operator >>(){}
- operator>(a, [b]) => true;
+ operator >>> (a, [b]) => true;
}
class Operators6 {
- operator >>(){}
- operator>(a, {b}) => true;
+ operator >>> (a, {b}) => true;
}
class Operators7 {
- operator >>(){}
- operator><T>(a) => true;
+ operator >>> <T>(a) => true;
}
main() {}
diff --git a/pkg/front_end/testcases/weak.status b/pkg/front_end/testcases/weak.status
index 8256003..2557390 100644
--- a/pkg/front_end/testcases/weak.status
+++ b/pkg/front_end/testcases/weak.status
@@ -93,6 +93,7 @@
general/issue41210b/issue41210: TypeCheckError
general/issue44733: TypeCheckError
general/issue45204: TypeCheckError
+general/issue_46886: RuntimeError
general/micro: RuntimeError
general/mixin_application_override: ExpectationFileMismatch # Too many errors.
general/mixin_application_override: TypeCheckError
diff --git a/tools/VERSION b/tools/VERSION
index d8f4d38..4444ab4 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -26,6 +26,6 @@
CHANNEL stable
MAJOR 2
MINOR 14
-PATCH 1
+PATCH 2
PRERELEASE 0
PRERELEASE_PATCH 0
\ No newline at end of file