[parser] Add `handleSwitchExpressionCaseArrow` listener event.

The parser now reports `handleSwitchExpressionCaseArrow` after the
pattern and guard (if any) of each switch expression case have been
parsed, and before the case's body is parsed.

This will allow a follow-up change to the CFE's pre-pass over
function bodies (which computes flow analysis `AssignedVariables`
information) to distinguish between code in a switch expression
case's guard and code in its body.

There is no change to user-visible behavior.

TAG=agy
CONV=0f865fb0-0d0a-4ef9-a59f-e0dee650ec2d

Change-Id: I21dc8691ceee8cb5123b249c614e60cb6a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/558840
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
diff --git a/pkg/_fe_analyzer_shared/lib/src/parser/forwarding_listener.dart b/pkg/_fe_analyzer_shared/lib/src/parser/forwarding_listener.dart
index 9d33532..76ba65f 100644
--- a/pkg/_fe_analyzer_shared/lib/src/parser/forwarding_listener.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/parser/forwarding_listener.dart
@@ -2286,6 +2286,11 @@
   }
 
   @override
+  void handleSwitchExpressionCaseArrow(Token arrow) {
+    listener?.handleSwitchExpressionCaseArrow(arrow);
+  }
+
+  @override
   void handleSwitchExpressionCasePattern(Token token) {
     listener?.handleSwitchExpressionCasePattern(token);
   }
diff --git a/pkg/_fe_analyzer_shared/lib/src/parser/listener.dart b/pkg/_fe_analyzer_shared/lib/src/parser/listener.dart
index 00e3f62..a6a9d69 100644
--- a/pkg/_fe_analyzer_shared/lib/src/parser/listener.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/parser/listener.dart
@@ -2128,6 +2128,16 @@
     logEvent("SwitchCaseNoWhenClause");
   }
 
+  /// Invoked after the pattern and the guard (if any) of a switch expression
+  /// case have been parsed, but before its body is parsed.
+  ///
+  /// [arrow] is the `=>` token separating the case's head from its body. (In
+  /// case of error recovery, it might be a `:` token or a synthetic `=>`
+  /// token.)
+  void handleSwitchExpressionCaseArrow(Token arrow) {
+    logEvent("SwitchExpressionCaseArrow");
+  }
+
   void handleSwitchExpressionCasePattern(Token token) {
     logEvent("SwitchExpressionCasePattern");
   }
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 6f9c5e0..735e297 100644
--- a/pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart
@@ -12509,6 +12509,7 @@
         } else {
           arrow = ensureFunctionArrow(token);
         }
+        listener.handleSwitchExpressionCaseArrow(arrow);
         token = arrow;
         mayParseFunctionExpressions = true;
         token = parseExpression(token);
diff --git a/pkg/analyzer/lib/src/fasta/ast_builder.dart b/pkg/analyzer/lib/src/fasta/ast_builder.dart
index 55deaee..cd86e1c 100644
--- a/pkg/analyzer/lib/src/fasta/ast_builder.dart
+++ b/pkg/analyzer/lib/src/fasta/ast_builder.dart
@@ -5768,6 +5768,11 @@
   }
 
   @override
+  void handleSwitchExpressionCaseArrow(Token arrow) {
+    debugEvent("SwitchExpressionCaseArrow");
+  }
+
+  @override
   void handleSwitchExpressionCasePattern(Token token) {
     debugEvent("SwitchExpressionCasePattern");
   }
diff --git a/pkg/front_end/lib/src/kernel/body_builder.dart b/pkg/front_end/lib/src/kernel/body_builder.dart
index 8d78063..e6aa237 100644
--- a/pkg/front_end/lib/src/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/kernel/body_builder.dart
@@ -8592,6 +8592,11 @@
   }
 
   @override
+  void handleSwitchExpressionCaseArrow(Token arrow) {
+    debugEvent("SwitchExpressionCaseArrow");
+  }
+
+  @override
   void handleSwitchExpressionCasePattern(Token token) {
     debugEvent("SwitchExpressionCasePattern");
     assert(
diff --git a/pkg/front_end/lib/src/util/parser_ast_helper.dart b/pkg/front_end/lib/src/util/parser_ast_helper.dart
index a42b8e0..56667b0 100644
--- a/pkg/front_end/lib/src/util/parser_ast_helper.dart
+++ b/pkg/front_end/lib/src/util/parser_ast_helper.dart
@@ -3565,6 +3565,15 @@
   }
 
   @override
+  void handleSwitchExpressionCaseArrow(Token arrow) {
+    SwitchExpressionCaseArrowHandle data = new SwitchExpressionCaseArrowHandle(
+      ParserAstType.HANDLE,
+      arrow: arrow,
+    );
+    seen(data);
+  }
+
+  @override
   void handleSwitchExpressionCasePattern(Token token) {
     SwitchExpressionCasePatternHandle data =
         new SwitchExpressionCasePatternHandle(
@@ -9758,6 +9767,20 @@
       v.visitSwitchCaseNoWhenClauseHandle(this);
 }
 
+class SwitchExpressionCaseArrowHandle extends ParserAstNode {
+  final Token arrow;
+
+  new(ParserAstType type, {required this.arrow})
+    : super("SwitchExpressionCaseArrow", type);
+
+  @override
+  Map<String, Object?> get deprecatedArguments => {"arrow": arrow};
+
+  @override
+  R accept<R>(ParserAstVisitor<R> v) =>
+      v.visitSwitchExpressionCaseArrowHandle(this);
+}
+
 class SwitchExpressionCasePatternHandle extends ParserAstNode {
   final Token token;
 
@@ -10999,6 +11022,7 @@
   R visitNoTypeVariablesHandle(NoTypeVariablesHandle node);
   R visitOperatorHandle(OperatorHandle node);
   R visitSwitchCaseNoWhenClauseHandle(SwitchCaseNoWhenClauseHandle node);
+  R visitSwitchExpressionCaseArrowHandle(SwitchExpressionCaseArrowHandle node);
   R visitSwitchExpressionCasePatternHandle(
     SwitchExpressionCasePatternHandle node,
   );
@@ -12302,6 +12326,11 @@
       node.visitChildren(this);
 
   @override
+  void visitSwitchExpressionCaseArrowHandle(
+    SwitchExpressionCaseArrowHandle node,
+  ) => node.visitChildren(this);
+
+  @override
   void visitSwitchExpressionCasePatternHandle(
     SwitchExpressionCasePatternHandle node,
   ) => node.visitChildren(this);
@@ -13816,6 +13845,11 @@
   ) => defaultNode(node);
 
   @override
+  Future<void> visitSwitchExpressionCaseArrowHandle(
+    SwitchExpressionCaseArrowHandle node,
+  ) => defaultNode(node);
+
+  @override
   Future<void> visitSwitchExpressionCasePatternHandle(
     SwitchExpressionCasePatternHandle node,
   ) => defaultNode(node);
diff --git a/pkg/front_end/parser_testcases/patterns/const_patterns.dart.expect b/pkg/front_end/parser_testcases/patterns/const_patterns.dart.expect
index e4e65b3..1a7b538 100644
--- a/pkg/front_end/parser_testcases/patterns/const_patterns.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/const_patterns.dart.expect
@@ -667,6 +667,7 @@
                                 handleWildcardPattern(null, _)
                               endPattern(_)
                               handleSwitchExpressionCasePattern(_)
+                              handleSwitchExpressionCaseArrow(=>)
                               handleLiteralBool(true)
                             endSwitchExpressionCase(_, null, =>, true)
                           endSwitchExpressionBlock(1, {, })
@@ -913,6 +914,7 @@
                                 handleWildcardPattern(null, _)
                               endPattern(_)
                               handleSwitchExpressionCasePattern(_)
+                              handleSwitchExpressionCaseArrow(=>)
                               handleLiteralBool(true)
                             endSwitchExpressionCase(_, null, =>, true)
                           endSwitchExpressionBlock(1, {, })
diff --git a/pkg/front_end/parser_testcases/patterns/const_patterns.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/const_patterns.dart.intertwined.expect
index 0c8461d..495d8c8 100644
--- a/pkg/front_end/parser_testcases/patterns/const_patterns.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/const_patterns.dart.intertwined.expect
@@ -1004,6 +1004,7 @@
                                         listener: endPattern(_)
                                       listener: handleSwitchExpressionCasePattern(_)
                                       ensureFunctionArrow(_)
+                                      listener: handleSwitchExpressionCaseArrow(=>)
                                       parseExpression(=>)
                                         looksLikeOuterPatternEquals(=>)
                                           skipOuterPattern(=>)
@@ -1532,6 +1533,7 @@
                                         listener: endPattern(_)
                                       listener: handleSwitchExpressionCasePattern(_)
                                       ensureFunctionArrow(_)
+                                      listener: handleSwitchExpressionCaseArrow(=>)
                                       parseExpression(=>)
                                         looksLikeOuterPatternEquals(=>)
                                           skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/constant_identifier_unprefixed_insideSwitchExpression.dart.expect b/pkg/front_end/parser_testcases/patterns/constant_identifier_unprefixed_insideSwitchExpression.dart.expect
index 684af70..deeada1 100644
--- a/pkg/front_end/parser_testcases/patterns/constant_identifier_unprefixed_insideSwitchExpression.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/constant_identifier_unprefixed_insideSwitchExpression.dart.expect
@@ -29,6 +29,7 @@
               endConstantPattern(null)
             endPattern(y)
             handleSwitchExpressionCasePattern(y)
+            handleSwitchExpressionCaseArrow(=>)
             handleLiteralInt(0)
           endSwitchExpressionCase(y, null, =>, 0)
         endSwitchExpressionBlock(1, {, })
diff --git a/pkg/front_end/parser_testcases/patterns/constant_identifier_unprefixed_insideSwitchExpression.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/constant_identifier_unprefixed_insideSwitchExpression.dart.intertwined.expect
index 4799a47..cb4b36a 100644
--- a/pkg/front_end/parser_testcases/patterns/constant_identifier_unprefixed_insideSwitchExpression.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/constant_identifier_unprefixed_insideSwitchExpression.dart.intertwined.expect
@@ -80,6 +80,7 @@
                         listener: endPattern(y)
                       listener: handleSwitchExpressionCasePattern(y)
                       ensureFunctionArrow(y)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideListPattern.dart.expect b/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideListPattern.dart.expect
index 9178b52..2de2b35 100644
--- a/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideListPattern.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideListPattern.dart.expect
@@ -38,6 +38,7 @@
               handleListPattern(1, [, ])
             endPattern(])
             handleSwitchExpressionCasePattern(])
+            handleSwitchExpressionCaseArrow(=>)
             handleLiteralInt(0)
           endSwitchExpressionCase([, null, =>, 0)
         endSwitchExpressionBlock(1, {, })
diff --git a/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideListPattern.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideListPattern.dart.intertwined.expect
index 5c3a57e..6dc816a 100644
--- a/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideListPattern.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideListPattern.dart.intertwined.expect
@@ -106,6 +106,7 @@
                         listener: endPattern(])
                       listener: handleSwitchExpressionCasePattern(])
                       ensureFunctionArrow(])
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideMapPattern.dart.expect b/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideMapPattern.dart.expect
index 14734cb..d977a33 100644
--- a/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideMapPattern.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideMapPattern.dart.expect
@@ -41,6 +41,7 @@
               handleMapPattern(1, {, })
             endPattern(})
             handleSwitchExpressionCasePattern(})
+            handleSwitchExpressionCaseArrow(=>)
             handleLiteralInt(0)
           endSwitchExpressionCase({, null, =>, 0)
         endSwitchExpressionBlock(1, {, })
diff --git a/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideMapPattern.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideMapPattern.dart.intertwined.expect
index 3a2ea90..fe853a4 100644
--- a/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideMapPattern.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideMapPattern.dart.intertwined.expect
@@ -117,6 +117,7 @@
                         listener: endPattern(})
                       listener: handleSwitchExpressionCasePattern(})
                       ensureFunctionArrow(})
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideObjectPattern.dart.expect b/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideObjectPattern.dart.expect
index 12c2e01..090c4f4 100644
--- a/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideObjectPattern.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideObjectPattern.dart.expect
@@ -41,6 +41,7 @@
               handleObjectPattern(Foo, null, null)
             endPattern())
             handleSwitchExpressionCasePattern())
+            handleSwitchExpressionCaseArrow(=>)
             handleLiteralInt(0)
           endSwitchExpressionCase(Foo, null, =>, 0)
         endSwitchExpressionBlock(1, {, })
diff --git a/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideObjectPattern.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideObjectPattern.dart.intertwined.expect
index 842eb9d..28b49d2 100644
--- a/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideObjectPattern.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideObjectPattern.dart.intertwined.expect
@@ -110,6 +110,7 @@
                         listener: endPattern())
                       listener: handleSwitchExpressionCasePattern())
                       ensureFunctionArrow())
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideParenthesizedConstPattern.dart.expect b/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideParenthesizedConstPattern.dart.expect
index aee16c5..6c37cec 100644
--- a/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideParenthesizedConstPattern.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideParenthesizedConstPattern.dart.expect
@@ -38,6 +38,7 @@
               endConstantPattern(const)
             endPattern())
             handleSwitchExpressionCasePattern())
+            handleSwitchExpressionCaseArrow(=>)
             handleLiteralInt(0)
           endSwitchExpressionCase(const, null, =>, 0)
         endSwitchExpressionBlock(1, {, })
diff --git a/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideParenthesizedConstPattern.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideParenthesizedConstPattern.dart.intertwined.expect
index 5a97470..e4f0cc1 100644
--- a/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideParenthesizedConstPattern.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideParenthesizedConstPattern.dart.intertwined.expect
@@ -112,6 +112,7 @@
                         listener: endPattern())
                       listener: handleSwitchExpressionCasePattern())
                       ensureFunctionArrow())
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideParenthesizedPattern.dart.expect b/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideParenthesizedPattern.dart.expect
index fcb7486..05d9814 100644
--- a/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideParenthesizedPattern.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideParenthesizedPattern.dart.expect
@@ -37,6 +37,7 @@
               handleParenthesizedPattern(()
             endPattern())
             handleSwitchExpressionCasePattern())
+            handleSwitchExpressionCaseArrow(=>)
             handleLiteralInt(0)
           endSwitchExpressionCase((, null, =>, 0)
         endSwitchExpressionBlock(1, {, })
diff --git a/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideParenthesizedPattern.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideParenthesizedPattern.dart.intertwined.expect
index 5c173c1..eac61f8 100644
--- a/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideParenthesizedPattern.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideParenthesizedPattern.dart.intertwined.expect
@@ -106,6 +106,7 @@
                         listener: endPattern())
                       listener: handleSwitchExpressionCasePattern())
                       ensureFunctionArrow())
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideSwitchExpressionCase_guarded.dart.expect b/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideSwitchExpressionCase_guarded.dart.expect
index a6f87ff..9483c62 100644
--- a/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideSwitchExpressionCase_guarded.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideSwitchExpressionCase_guarded.dart.expect
@@ -39,6 +39,7 @@
                   endPattern(_)
                   handleSwitchExpressionCasePattern(_)
                   handleLiteralBool(true)
+                  handleSwitchExpressionCaseArrow(=>)
                   handleNoTypeVariables(()
                   beginFunctionExpression(()
                     beginFormalParameters((, MemberKind.Local)
@@ -50,6 +51,7 @@
                 endSwitchExpressionCase(_, when, =>, 0)
               endSwitchExpressionBlock(1, {, })
             endSwitchExpression(switch, })
+            handleSwitchExpressionCaseArrow(=>)
             handleLiteralInt(0)
           endSwitchExpressionCase(_, when, =>, 0)
         endSwitchExpressionBlock(1, {, })
diff --git a/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideSwitchExpressionCase_guarded.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideSwitchExpressionCase_guarded.dart.intertwined.expect
index b2dd30a..756ce89 100644
--- a/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideSwitchExpressionCase_guarded.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideSwitchExpressionCase_guarded.dart.intertwined.expect
@@ -117,6 +117,7 @@
                                         parseLiteralBool(when)
                                           listener: handleLiteralBool(true)
                                 ensureFunctionArrow(true)
+                                listener: handleSwitchExpressionCaseArrow(=>)
                                 parseExpression(=>)
                                   looksLikeOuterPatternEquals(=>)
                                     skipOuterPattern(=>)
@@ -152,6 +153,7 @@
                                 listener: endSwitchExpressionBlock(1, {, })
                                 listener: endSwitchExpression(switch, })
                       ensureFunctionArrow(})
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideSwitchExpressionCase_unguarded.dart.expect b/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideSwitchExpressionCase_unguarded.dart.expect
index c9492f7..d5eba77 100644
--- a/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideSwitchExpressionCase_unguarded.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideSwitchExpressionCase_unguarded.dart.expect
@@ -38,6 +38,7 @@
                     handleWildcardPattern(null, _)
                   endPattern(_)
                   handleSwitchExpressionCasePattern(_)
+                  handleSwitchExpressionCaseArrow(=>)
                   handleNoTypeVariables(()
                   beginFunctionExpression(()
                     beginFormalParameters((, MemberKind.Local)
@@ -49,6 +50,7 @@
                 endSwitchExpressionCase(_, null, =>, 0)
               endSwitchExpressionBlock(1, {, })
             endSwitchExpression(switch, })
+            handleSwitchExpressionCaseArrow(=>)
             handleLiteralInt(0)
           endSwitchExpressionCase(_, when, =>, 0)
         endSwitchExpressionBlock(1, {, })
diff --git a/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideSwitchExpressionCase_unguarded.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideSwitchExpressionCase_unguarded.dart.intertwined.expect
index cc6aaf0..666fda4 100644
--- a/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideSwitchExpressionCase_unguarded.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/functionExpression_allowed_insideSwitchExpressionCase_unguarded.dart.intertwined.expect
@@ -109,6 +109,7 @@
                                   listener: endPattern(_)
                                 listener: handleSwitchExpressionCasePattern(_)
                                 ensureFunctionArrow(_)
+                                listener: handleSwitchExpressionCaseArrow(=>)
                                 parseExpression(=>)
                                   looksLikeOuterPatternEquals(=>)
                                     skipOuterPattern(=>)
@@ -144,6 +145,7 @@
                                 listener: endSwitchExpressionBlock(1, {, })
                                 listener: endSwitchExpression(switch, })
                       ensureFunctionArrow(})
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterListPattern.dart.expect b/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterListPattern.dart.expect
index 6b8e4d1..2ede65c 100644
--- a/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterListPattern.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterListPattern.dart.expect
@@ -33,6 +33,7 @@
             handleSwitchExpressionCasePattern(])
             beginParenthesizedExpressionOrRecordLiteral(()
             endRecordLiteral((, 0, null)
+            handleSwitchExpressionCaseArrow(=>)
             handleLiteralInt(0)
           endSwitchExpressionCase([, when, =>, 0)
         endSwitchExpressionBlock(1, {, })
diff --git a/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterListPattern.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterListPattern.dart.intertwined.expect
index a6a5491..ab8126a 100644
--- a/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterListPattern.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterListPattern.dart.intertwined.expect
@@ -91,6 +91,7 @@
                                   ensureCloseParen((, ()
                                   listener: endRecordLiteral((, 0, null)
                       ensureFunctionArrow())
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterMapPattern.dart.expect b/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterMapPattern.dart.expect
index 939009b..70b9801 100644
--- a/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterMapPattern.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterMapPattern.dart.expect
@@ -36,6 +36,7 @@
             handleSwitchExpressionCasePattern(})
             beginParenthesizedExpressionOrRecordLiteral(()
             endRecordLiteral((, 0, null)
+            handleSwitchExpressionCaseArrow(=>)
             handleLiteralInt(0)
           endSwitchExpressionCase({, when, =>, 0)
         endSwitchExpressionBlock(1, {, })
diff --git a/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterMapPattern.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterMapPattern.dart.intertwined.expect
index 78f0c43..a0b884f 100644
--- a/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterMapPattern.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterMapPattern.dart.intertwined.expect
@@ -102,6 +102,7 @@
                                   ensureCloseParen((, ()
                                   listener: endRecordLiteral((, 0, null)
                       ensureFunctionArrow())
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterObjectPattern.dart.expect b/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterObjectPattern.dart.expect
index f9c7c36..53113da 100644
--- a/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterObjectPattern.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterObjectPattern.dart.expect
@@ -36,6 +36,7 @@
             handleSwitchExpressionCasePattern())
             beginParenthesizedExpressionOrRecordLiteral(()
             endRecordLiteral((, 0, null)
+            handleSwitchExpressionCaseArrow(=>)
             handleLiteralInt(0)
           endSwitchExpressionCase(Foo, when, =>, 0)
         endSwitchExpressionBlock(1, {, })
diff --git a/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterObjectPattern.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterObjectPattern.dart.intertwined.expect
index 1a2f789..c4ac5b7 100644
--- a/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterObjectPattern.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterObjectPattern.dart.intertwined.expect
@@ -95,6 +95,7 @@
                                   ensureCloseParen((, ()
                                   listener: endRecordLiteral((, 0, null)
                       ensureFunctionArrow())
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterParenthesizedPattern.dart.expect b/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterParenthesizedPattern.dart.expect
index 8173a6f..02b208f 100644
--- a/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterParenthesizedPattern.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterParenthesizedPattern.dart.expect
@@ -32,6 +32,7 @@
             handleSwitchExpressionCasePattern())
             beginParenthesizedExpressionOrRecordLiteral(()
             endRecordLiteral((, 0, null)
+            handleSwitchExpressionCaseArrow(=>)
             handleLiteralInt(0)
           endSwitchExpressionCase((, when, =>, 0)
         endSwitchExpressionBlock(1, {, })
diff --git a/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterParenthesizedPattern.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterParenthesizedPattern.dart.intertwined.expect
index e9b1195..82c6755 100644
--- a/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterParenthesizedPattern.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterParenthesizedPattern.dart.intertwined.expect
@@ -91,6 +91,7 @@
                                   ensureCloseParen((, ()
                                   listener: endRecordLiteral((, 0, null)
                       ensureFunctionArrow())
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterSwitchExpressionInWhenClause.dart.expect b/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterSwitchExpressionInWhenClause.dart.expect
index 79ca85f..17ff003 100644
--- a/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterSwitchExpressionInWhenClause.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterSwitchExpressionInWhenClause.dart.expect
@@ -38,6 +38,7 @@
               beginParenthesizedExpressionOrRecordLiteral(()
               endRecordLiteral((, 0, null)
             endBinaryExpression(+, ))
+            handleSwitchExpressionCaseArrow(=>)
             handleLiteralInt(0)
           endSwitchExpressionCase(_, when, =>, 0)
         endSwitchExpressionBlock(1, {, })
diff --git a/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterSwitchExpressionInWhenClause.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterSwitchExpressionInWhenClause.dart.intertwined.expect
index 92ce7f7..aa536e1 100644
--- a/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterSwitchExpressionInWhenClause.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_afterSwitchExpressionInWhenClause.dart.intertwined.expect
@@ -112,6 +112,7 @@
                                     listener: endRecordLiteral((, 0, null)
                           listener: endBinaryExpression(+, ))
                       ensureFunctionArrow())
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_insideSwitchExpressionInWhenClause.dart.expect b/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_insideSwitchExpressionInWhenClause.dart.expect
index 09022f1..f816e7c 100644
--- a/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_insideSwitchExpressionInWhenClause.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_insideSwitchExpressionInWhenClause.dart.expect
@@ -40,6 +40,7 @@
               beginParenthesizedExpressionOrRecordLiteral(()
               endRecordLiteral((, 0, null)
             endBinaryExpression(+, ))
+            handleSwitchExpressionCaseArrow(=>)
             handleLiteralInt(0)
           endSwitchExpressionCase(_, when, =>, 0)
         endSwitchExpressionBlock(1, {, })
diff --git a/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_insideSwitchExpressionInWhenClause.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_insideSwitchExpressionInWhenClause.dart.intertwined.expect
index b2f7c71..91d10a8 100644
--- a/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_insideSwitchExpressionInWhenClause.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/functionExpression_disallowed_insideSwitchExpressionInWhenClause.dart.intertwined.expect
@@ -105,6 +105,7 @@
                                     listener: endRecordLiteral((, 0, null)
                           listener: endBinaryExpression(+, ))
                       ensureFunctionArrow())
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/issue50591.dart.expect b/pkg/front_end/parser_testcases/patterns/issue50591.dart.expect
index b714aa4..d17225a 100644
--- a/pkg/front_end/parser_testcases/patterns/issue50591.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/issue50591.dart.expect
@@ -45,6 +45,7 @@
             beginArguments(()
             endArguments(0, (, ))
             handleInvocationWithoutTypeArguments(a, ))
+            handleSwitchExpressionCaseArrow(=>)
             handleLiteralInt(0)
           endSwitchExpressionCase(_, when, =>, 0)
         endSwitchExpressionBlock(1, {, })
diff --git a/pkg/front_end/parser_testcases/patterns/issue50591.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/issue50591.dart.intertwined.expect
index dbb7a3f..36f4ac8 100644
--- a/pkg/front_end/parser_testcases/patterns/issue50591.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/issue50591.dart.intertwined.expect
@@ -110,6 +110,7 @@
                                         listener: endArguments(0, (, ))
                                   listener: handleInvocationWithoutTypeArguments(a, ))
                       ensureFunctionArrow())
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/issue50591_example2.dart.expect b/pkg/front_end/parser_testcases/patterns/issue50591_example2.dart.expect
index 15fa6e9..074bb87 100644
--- a/pkg/front_end/parser_testcases/patterns/issue50591_example2.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/issue50591_example2.dart.expect
@@ -41,6 +41,7 @@
                   endConstantPattern(const)
                 endPattern())
                 handleSwitchExpressionCasePattern())
+                handleSwitchExpressionCaseArrow(=>)
                 handleLiteralInt(0)
               endSwitchExpressionCase(const, null, =>, 0)
               beginSwitchExpressionCase()
@@ -49,6 +50,7 @@
                   handleWildcardPattern(null, _)
                 endPattern(_)
                 handleSwitchExpressionCasePattern(_)
+                handleSwitchExpressionCaseArrow(=>)
                 handleLiteralInt(1)
               endSwitchExpressionCase(_, null, =>, 1)
             endSwitchExpressionBlock(2, {, })
diff --git a/pkg/front_end/parser_testcases/patterns/issue50591_example2.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/issue50591_example2.dart.intertwined.expect
index c4f5e67..ffe767d 100644
--- a/pkg/front_end/parser_testcases/patterns/issue50591_example2.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/issue50591_example2.dart.intertwined.expect
@@ -102,6 +102,7 @@
                                             listener: endPattern())
                                           listener: handleSwitchExpressionCasePattern())
                                           ensureFunctionArrow())
+                                          listener: handleSwitchExpressionCaseArrow(=>)
                                           parseExpression(=>)
                                             looksLikeOuterPatternEquals(=>)
                                               skipOuterPattern(=>)
@@ -121,6 +122,7 @@
                                             listener: endPattern(_)
                                           listener: handleSwitchExpressionCasePattern(_)
                                           ensureFunctionArrow(_)
+                                          listener: handleSwitchExpressionCaseArrow(=>)
                                           parseExpression(=>)
                                             looksLikeOuterPatternEquals(=>)
                                               skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/issue_51230.dart.expect b/pkg/front_end/parser_testcases/patterns/issue_51230.dart.expect
index b2465aa..c862ab8 100644
--- a/pkg/front_end/parser_testcases/patterns/issue_51230.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/issue_51230.dart.expect
@@ -29,6 +29,7 @@
               handleDeclaredVariablePattern(final, a, false)
             endPattern(a)
             handleSwitchExpressionCasePattern(a)
+            handleSwitchExpressionCaseArrow(=>)
             beginLiteralString('working')
             endLiteralString(0, 'working')
           endSwitchExpressionCase(final, null, =>, 'working')
@@ -40,6 +41,7 @@
               handleDeclaredVariablePattern(final, a, false)
             endPattern(a)
             handleSwitchExpressionCasePattern(a)
+            handleSwitchExpressionCaseArrow(=>)
             beginLiteralString('working')
             endLiteralString(0, 'working')
           endSwitchExpressionCase(final, null, =>, 'working')
@@ -50,6 +52,7 @@
               handleDeclaredVariablePattern(final, a, false)
             endPattern(a)
             handleSwitchExpressionCasePattern(a)
+            handleSwitchExpressionCaseArrow(=>)
             beginLiteralString('working')
             endLiteralString(0, 'working')
           endSwitchExpressionCase(final, null, =>, 'working')
@@ -76,6 +79,7 @@
               handleDeclaredVariablePattern(final, a, false)
             endPattern(a)
             handleSwitchExpressionCasePattern(a)
+            handleSwitchExpressionCaseArrow(=>)
             beginLiteralString('working')
             endLiteralString(0, 'working')
           endSwitchExpressionCase(final, null, =>, 'working')
@@ -88,6 +92,7 @@
               handleNullCheckPattern(?)
             endPattern(?)
             handleSwitchExpressionCasePattern(?)
+            handleSwitchExpressionCaseArrow(=>)
             beginLiteralString('working')
             endLiteralString(0, 'working')
           endSwitchExpressionCase(final, null, =>, 'working')
@@ -100,6 +105,7 @@
               handleNullCheckPattern(?)
             endPattern(?)
             handleSwitchExpressionCasePattern(?)
+            handleSwitchExpressionCaseArrow(=>)
             beginLiteralString('working')
             endLiteralString(0, 'working')
           endSwitchExpressionCase(final, null, =>, 'working')
@@ -111,6 +117,7 @@
               handleNullCheckPattern(?)
             endPattern(?)
             handleSwitchExpressionCasePattern(?)
+            handleSwitchExpressionCaseArrow(=>)
             beginLiteralString('working')
             endLiteralString(0, 'working')
           endSwitchExpressionCase(final, null, =>, 'working')
@@ -138,6 +145,7 @@
               handleNullCheckPattern(?)
             endPattern(?)
             handleSwitchExpressionCasePattern(?)
+            handleSwitchExpressionCaseArrow(=>)
             beginLiteralString('working')
             endLiteralString(0, 'working')
           endSwitchExpressionCase(final, null, =>, 'working')
@@ -153,6 +161,7 @@
               handleRecordPattern((, 1)
             endPattern())
             handleSwitchExpressionCasePattern())
+            handleSwitchExpressionCaseArrow(=>)
             beginLiteralString('working')
             endLiteralString(0, 'working')
           endSwitchExpressionCase((, null, =>, 'working')
@@ -184,6 +193,7 @@
               handleRecordPattern((, 1)
             endPattern())
             handleSwitchExpressionCasePattern())
+            handleSwitchExpressionCaseArrow(=>)
             beginLiteralString('working')
             endLiteralString(0, 'working')
           endSwitchExpressionCase((, null, =>, 'working')
@@ -201,6 +211,7 @@
               handleRecordPattern((, 1)
             endPattern())
             handleSwitchExpressionCasePattern())
+            handleSwitchExpressionCaseArrow(=>)
             beginLiteralString('working')
             endLiteralString(0, 'working')
           endSwitchExpressionCase((, null, =>, 'working')
@@ -218,6 +229,7 @@
               handleRecordPattern((, 1)
             endPattern())
             handleSwitchExpressionCasePattern())
+            handleSwitchExpressionCaseArrow(=>)
             beginLiteralString('working')
             endLiteralString(0, 'working')
           endSwitchExpressionCase((, null, =>, 'working')
@@ -234,6 +246,7 @@
               handleRecordPattern((, 1)
             endPattern())
             handleSwitchExpressionCasePattern())
+            handleSwitchExpressionCaseArrow(=>)
             beginLiteralString('working')
             endLiteralString(0, 'working')
           endSwitchExpressionCase((, null, =>, 'working')
@@ -266,6 +279,7 @@
               handleRecordPattern((, 1)
             endPattern())
             handleSwitchExpressionCasePattern())
+            handleSwitchExpressionCaseArrow(=>)
             beginLiteralString('working')
             endLiteralString(0, 'working')
           endSwitchExpressionCase((, null, =>, 'working')
@@ -275,6 +289,7 @@
               handleWildcardPattern(null, _)
             endPattern(_)
             handleSwitchExpressionCasePattern(_)
+            handleSwitchExpressionCaseArrow(=>)
             beginLiteralString('')
             endLiteralString(0, '')
           endSwitchExpressionCase(_, null, =>, '')
@@ -313,6 +328,7 @@
               handleDeclaredVariablePattern(final, async, false)
             endPattern(async)
             handleSwitchExpressionCasePattern(async)
+            handleSwitchExpressionCaseArrow(=>)
             beginLiteralString('working')
             endLiteralString(0, 'working')
           endSwitchExpressionCase(final, null, =>, 'working')
@@ -324,6 +340,7 @@
               handleDeclaredVariablePattern(final, async, false)
             endPattern(async)
             handleSwitchExpressionCasePattern(async)
+            handleSwitchExpressionCaseArrow(=>)
             beginLiteralString('working')
             endLiteralString(0, 'working')
           endSwitchExpressionCase(final, null, =>, 'working')
@@ -334,6 +351,7 @@
               handleDeclaredVariablePattern(final, async, false)
             endPattern(async)
             handleSwitchExpressionCasePattern(async)
+            handleSwitchExpressionCaseArrow(=>)
             beginLiteralString('working')
             endLiteralString(0, 'working')
           endSwitchExpressionCase(final, null, =>, 'working')
@@ -360,6 +378,7 @@
               handleDeclaredVariablePattern(final, async, false)
             endPattern(async)
             handleSwitchExpressionCasePattern(async)
+            handleSwitchExpressionCaseArrow(=>)
             beginLiteralString('working')
             endLiteralString(0, 'working')
           endSwitchExpressionCase(final, null, =>, 'working')
@@ -372,6 +391,7 @@
               handleNullCheckPattern(?)
             endPattern(?)
             handleSwitchExpressionCasePattern(?)
+            handleSwitchExpressionCaseArrow(=>)
             beginLiteralString('working')
             endLiteralString(0, 'working')
           endSwitchExpressionCase(final, null, =>, 'working')
@@ -384,6 +404,7 @@
               handleNullCheckPattern(?)
             endPattern(?)
             handleSwitchExpressionCasePattern(?)
+            handleSwitchExpressionCaseArrow(=>)
             beginLiteralString('working')
             endLiteralString(0, 'working')
           endSwitchExpressionCase(final, null, =>, 'working')
@@ -395,6 +416,7 @@
               handleNullCheckPattern(?)
             endPattern(?)
             handleSwitchExpressionCasePattern(?)
+            handleSwitchExpressionCaseArrow(=>)
             beginLiteralString('working')
             endLiteralString(0, 'working')
           endSwitchExpressionCase(final, null, =>, 'working')
@@ -422,6 +444,7 @@
               handleNullCheckPattern(?)
             endPattern(?)
             handleSwitchExpressionCasePattern(?)
+            handleSwitchExpressionCaseArrow(=>)
             beginLiteralString('working')
             endLiteralString(0, 'working')
           endSwitchExpressionCase(final, null, =>, 'working')
@@ -437,6 +460,7 @@
               handleRecordPattern((, 1)
             endPattern())
             handleSwitchExpressionCasePattern())
+            handleSwitchExpressionCaseArrow(=>)
             beginLiteralString('working')
             endLiteralString(0, 'working')
           endSwitchExpressionCase((, null, =>, 'working')
@@ -468,6 +492,7 @@
               handleRecordPattern((, 1)
             endPattern())
             handleSwitchExpressionCasePattern())
+            handleSwitchExpressionCaseArrow(=>)
             beginLiteralString('working')
             endLiteralString(0, 'working')
           endSwitchExpressionCase((, null, =>, 'working')
@@ -485,6 +510,7 @@
               handleRecordPattern((, 1)
             endPattern())
             handleSwitchExpressionCasePattern())
+            handleSwitchExpressionCaseArrow(=>)
             beginLiteralString('working')
             endLiteralString(0, 'working')
           endSwitchExpressionCase((, null, =>, 'working')
@@ -502,6 +528,7 @@
               handleRecordPattern((, 1)
             endPattern())
             handleSwitchExpressionCasePattern())
+            handleSwitchExpressionCaseArrow(=>)
             beginLiteralString('working')
             endLiteralString(0, 'working')
           endSwitchExpressionCase((, null, =>, 'working')
@@ -518,6 +545,7 @@
               handleRecordPattern((, 1)
             endPattern())
             handleSwitchExpressionCasePattern())
+            handleSwitchExpressionCaseArrow(=>)
             beginLiteralString('working')
             endLiteralString(0, 'working')
           endSwitchExpressionCase((, null, =>, 'working')
@@ -550,6 +578,7 @@
               handleRecordPattern((, 1)
             endPattern())
             handleSwitchExpressionCasePattern())
+            handleSwitchExpressionCaseArrow(=>)
             beginLiteralString('working')
             endLiteralString(0, 'working')
           endSwitchExpressionCase((, null, =>, 'working')
@@ -559,6 +588,7 @@
               handleWildcardPattern(null, _)
             endPattern(_)
             handleSwitchExpressionCasePattern(_)
+            handleSwitchExpressionCaseArrow(=>)
             beginLiteralString('')
             endLiteralString(0, '')
           endSwitchExpressionCase(_, null, =>, '')
diff --git a/pkg/front_end/parser_testcases/patterns/issue_51230.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/issue_51230.dart.intertwined.expect
index d770543..c203119 100644
--- a/pkg/front_end/parser_testcases/patterns/issue_51230.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/issue_51230.dart.intertwined.expect
@@ -75,6 +75,7 @@
                         listener: endPattern(a)
                       listener: handleSwitchExpressionCasePattern(a)
                       ensureFunctionArrow(a)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
@@ -98,6 +99,7 @@
                         listener: endPattern(a)
                       listener: handleSwitchExpressionCasePattern(a)
                       ensureFunctionArrow(a)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
@@ -121,6 +123,7 @@
                         listener: endPattern(a)
                       listener: handleSwitchExpressionCasePattern(a)
                       ensureFunctionArrow(a)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
@@ -164,6 +167,7 @@
                         listener: endPattern(a)
                       listener: handleSwitchExpressionCasePattern(a)
                       ensureFunctionArrow(a)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
@@ -188,6 +192,7 @@
                         listener: endPattern(?)
                       listener: handleSwitchExpressionCasePattern(?)
                       ensureFunctionArrow(?)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
@@ -212,6 +217,7 @@
                         listener: endPattern(?)
                       listener: handleSwitchExpressionCasePattern(?)
                       ensureFunctionArrow(?)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
@@ -236,6 +242,7 @@
                         listener: endPattern(?)
                       listener: handleSwitchExpressionCasePattern(?)
                       ensureFunctionArrow(?)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
@@ -280,6 +287,7 @@
                         listener: endPattern(?)
                       listener: handleSwitchExpressionCasePattern(?)
                       ensureFunctionArrow(?)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
@@ -312,6 +320,7 @@
                         listener: endPattern())
                       listener: handleSwitchExpressionCasePattern())
                       ensureFunctionArrow())
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
@@ -364,6 +373,7 @@
                         listener: endPattern())
                       listener: handleSwitchExpressionCasePattern())
                       ensureFunctionArrow())
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
@@ -397,6 +407,7 @@
                         listener: endPattern())
                       listener: handleSwitchExpressionCasePattern())
                       ensureFunctionArrow())
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
@@ -430,6 +441,7 @@
                         listener: endPattern())
                       listener: handleSwitchExpressionCasePattern())
                       ensureFunctionArrow())
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
@@ -463,6 +475,7 @@
                         listener: endPattern())
                       listener: handleSwitchExpressionCasePattern())
                       ensureFunctionArrow())
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
@@ -516,6 +529,7 @@
                         listener: endPattern())
                       listener: handleSwitchExpressionCasePattern())
                       ensureFunctionArrow())
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
@@ -537,6 +551,7 @@
                         listener: endPattern(_)
                       listener: handleSwitchExpressionCasePattern(_)
                       ensureFunctionArrow(_)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
@@ -628,6 +643,7 @@
                         listener: endPattern(async)
                       listener: handleSwitchExpressionCasePattern(async)
                       ensureFunctionArrow(async)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
@@ -651,6 +667,7 @@
                         listener: endPattern(async)
                       listener: handleSwitchExpressionCasePattern(async)
                       ensureFunctionArrow(async)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
@@ -674,6 +691,7 @@
                         listener: endPattern(async)
                       listener: handleSwitchExpressionCasePattern(async)
                       ensureFunctionArrow(async)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
@@ -717,6 +735,7 @@
                         listener: endPattern(async)
                       listener: handleSwitchExpressionCasePattern(async)
                       ensureFunctionArrow(async)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
@@ -741,6 +760,7 @@
                         listener: endPattern(?)
                       listener: handleSwitchExpressionCasePattern(?)
                       ensureFunctionArrow(?)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
@@ -765,6 +785,7 @@
                         listener: endPattern(?)
                       listener: handleSwitchExpressionCasePattern(?)
                       ensureFunctionArrow(?)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
@@ -789,6 +810,7 @@
                         listener: endPattern(?)
                       listener: handleSwitchExpressionCasePattern(?)
                       ensureFunctionArrow(?)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
@@ -833,6 +855,7 @@
                         listener: endPattern(?)
                       listener: handleSwitchExpressionCasePattern(?)
                       ensureFunctionArrow(?)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
@@ -865,6 +888,7 @@
                         listener: endPattern())
                       listener: handleSwitchExpressionCasePattern())
                       ensureFunctionArrow())
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
@@ -917,6 +941,7 @@
                         listener: endPattern())
                       listener: handleSwitchExpressionCasePattern())
                       ensureFunctionArrow())
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
@@ -950,6 +975,7 @@
                         listener: endPattern())
                       listener: handleSwitchExpressionCasePattern())
                       ensureFunctionArrow())
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
@@ -983,6 +1009,7 @@
                         listener: endPattern())
                       listener: handleSwitchExpressionCasePattern())
                       ensureFunctionArrow())
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
@@ -1016,6 +1043,7 @@
                         listener: endPattern())
                       listener: handleSwitchExpressionCasePattern())
                       ensureFunctionArrow())
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
@@ -1069,6 +1097,7 @@
                         listener: endPattern())
                       listener: handleSwitchExpressionCasePattern())
                       ensureFunctionArrow())
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
@@ -1090,6 +1119,7 @@
                         listener: endPattern(_)
                       listener: handleSwitchExpressionCasePattern(_)
                       ensureFunctionArrow(_)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/issue_52439.dart.expect b/pkg/front_end/parser_testcases/patterns/issue_52439.dart.expect
index 124323b..95b77e2 100644
--- a/pkg/front_end/parser_testcases/patterns/issue_52439.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/issue_52439.dart.expect
@@ -47,6 +47,7 @@
                 handleWildcardPattern(null, _)
               endPattern(_)
               handleSwitchExpressionCasePattern(_)
+              handleSwitchExpressionCaseArrow(=>)
               beginParenthesizedExpressionOrRecordLiteral(()
                 handleLiteralInt(42)
                 handlePositionalRecordField(42)
diff --git a/pkg/front_end/parser_testcases/patterns/issue_52439.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/issue_52439.dart.intertwined.expect
index 362f149..eb39512 100644
--- a/pkg/front_end/parser_testcases/patterns/issue_52439.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/issue_52439.dart.intertwined.expect
@@ -107,6 +107,7 @@
                               listener: endPattern(_)
                             listener: handleSwitchExpressionCasePattern(_)
                             ensureFunctionArrow(_)
+                            listener: handleSwitchExpressionCaseArrow(=>)
                             parseExpression(=>)
                               looksLikeOuterPatternEquals(=>)
                                 skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/issue_61239.crash_dart.expect b/pkg/front_end/parser_testcases/patterns/issue_61239.crash_dart.expect
index 1bbdb335..34728cb 100644
--- a/pkg/front_end/parser_testcases/patterns/issue_61239.crash_dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/issue_61239.crash_dart.expect
@@ -45,6 +45,7 @@
                 endPattern(42)
                 handleSwitchExpressionCasePattern(42)
                 handleRecoverableError(Message[Template(ExpectedButGot), Expected '=>' before this., null, {expected: =>}], xor, xor)
+                handleSwitchExpressionCaseArrow(=>)
                 handleIdentifier(xor, expression)
                 handleSendWithoutArguments(xor, xor, =>)
               endSwitchExpressionCase(42, null, =>, xor)
@@ -55,6 +56,7 @@
                   handleWildcardPattern(null, _)
                 endPattern(_)
                 handleSwitchExpressionCasePattern(_)
+                handleSwitchExpressionCaseArrow(=>)
                 handleLiteralInt(0)
               endSwitchExpressionCase(_, null, =>, 0)
             endSwitchExpressionBlock(2, {, })
diff --git a/pkg/front_end/parser_testcases/patterns/issue_61239.crash_dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/issue_61239.crash_dart.intertwined.expect
index d22e7bc..4ada396 100644
--- a/pkg/front_end/parser_testcases/patterns/issue_61239.crash_dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/issue_61239.crash_dart.intertwined.expect
@@ -93,6 +93,7 @@
                               reportRecoverableError(xor, Message[Template(ExpectedButGot), Expected '=>' before this., null, {expected: =>}])
                                 listener: handleRecoverableError(Message[Template(ExpectedButGot), Expected '=>' before this., null, {expected: =>}], xor, xor)
                               rewriter()
+                          listener: handleSwitchExpressionCaseArrow(=>)
                           parseExpression(=>)
                             looksLikeOuterPatternEquals(=>)
                               skipOuterPattern(=>)
@@ -119,6 +120,7 @@
                             listener: endPattern(_)
                           listener: handleSwitchExpressionCasePattern(_)
                           ensureFunctionArrow(_)
+                          listener: handleSwitchExpressionCaseArrow(=>)
                           parseExpression(=>)
                             looksLikeOuterPatternEquals(=>)
                               skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/recordTypedVariablePattern_nonNullable_beforeRightArrow.dart.expect b/pkg/front_end/parser_testcases/patterns/recordTypedVariablePattern_nonNullable_beforeRightArrow.dart.expect
index d5fb07f..c109e58 100644
--- a/pkg/front_end/parser_testcases/patterns/recordTypedVariablePattern_nonNullable_beforeRightArrow.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/recordTypedVariablePattern_nonNullable_beforeRightArrow.dart.expect
@@ -36,6 +36,7 @@
               handleDeclaredVariablePattern(null, y, false)
             endPattern(y)
             handleSwitchExpressionCasePattern(y)
+            handleSwitchExpressionCaseArrow(=>)
             handleLiteralInt(0)
           endSwitchExpressionCase((, null, =>, 0)
         endSwitchExpressionBlock(1, {, })
diff --git a/pkg/front_end/parser_testcases/patterns/recordTypedVariablePattern_nonNullable_beforeRightArrow.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/recordTypedVariablePattern_nonNullable_beforeRightArrow.dart.intertwined.expect
index 61714fe..f21e616 100644
--- a/pkg/front_end/parser_testcases/patterns/recordTypedVariablePattern_nonNullable_beforeRightArrow.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/recordTypedVariablePattern_nonNullable_beforeRightArrow.dart.intertwined.expect
@@ -84,6 +84,7 @@
                         listener: endPattern(y)
                       listener: handleSwitchExpressionCasePattern(y)
                       ensureFunctionArrow(y)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/recordTypedVariablePattern_nullable_beforeRightArrow.dart.expect b/pkg/front_end/parser_testcases/patterns/recordTypedVariablePattern_nullable_beforeRightArrow.dart.expect
index 34627bb..d2e0014 100644
--- a/pkg/front_end/parser_testcases/patterns/recordTypedVariablePattern_nullable_beforeRightArrow.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/recordTypedVariablePattern_nullable_beforeRightArrow.dart.expect
@@ -36,6 +36,7 @@
               handleDeclaredVariablePattern(null, y, false)
             endPattern(y)
             handleSwitchExpressionCasePattern(y)
+            handleSwitchExpressionCaseArrow(=>)
             handleLiteralInt(0)
           endSwitchExpressionCase((, null, =>, 0)
         endSwitchExpressionBlock(1, {, })
diff --git a/pkg/front_end/parser_testcases/patterns/recordTypedVariablePattern_nullable_beforeRightArrow.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/recordTypedVariablePattern_nullable_beforeRightArrow.dart.intertwined.expect
index 51b403e..1efe317 100644
--- a/pkg/front_end/parser_testcases/patterns/recordTypedVariablePattern_nullable_beforeRightArrow.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/recordTypedVariablePattern_nullable_beforeRightArrow.dart.intertwined.expect
@@ -84,6 +84,7 @@
                         listener: endPattern(y)
                       listener: handleSwitchExpressionCasePattern(y)
                       ensureFunctionArrow(y)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/recordTypedWildcardPattern_nonNullable_beforeRightArrow.dart.expect b/pkg/front_end/parser_testcases/patterns/recordTypedWildcardPattern_nonNullable_beforeRightArrow.dart.expect
index 53c9f59..9f40200 100644
--- a/pkg/front_end/parser_testcases/patterns/recordTypedWildcardPattern_nonNullable_beforeRightArrow.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/recordTypedWildcardPattern_nonNullable_beforeRightArrow.dart.expect
@@ -36,6 +36,7 @@
               handleWildcardPattern(null, _)
             endPattern(_)
             handleSwitchExpressionCasePattern(_)
+            handleSwitchExpressionCaseArrow(=>)
             handleLiteralInt(0)
           endSwitchExpressionCase((, null, =>, 0)
         endSwitchExpressionBlock(1, {, })
diff --git a/pkg/front_end/parser_testcases/patterns/recordTypedWildcardPattern_nonNullable_beforeRightArrow.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/recordTypedWildcardPattern_nonNullable_beforeRightArrow.dart.intertwined.expect
index a7a7449..a1643b7 100644
--- a/pkg/front_end/parser_testcases/patterns/recordTypedWildcardPattern_nonNullable_beforeRightArrow.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/recordTypedWildcardPattern_nonNullable_beforeRightArrow.dart.intertwined.expect
@@ -84,6 +84,7 @@
                         listener: endPattern(_)
                       listener: handleSwitchExpressionCasePattern(_)
                       ensureFunctionArrow(_)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/recordTypedWildcardPattern_nullable_beforeRightArrow.dart.expect b/pkg/front_end/parser_testcases/patterns/recordTypedWildcardPattern_nullable_beforeRightArrow.dart.expect
index d1c40e8..32b90a1 100644
--- a/pkg/front_end/parser_testcases/patterns/recordTypedWildcardPattern_nullable_beforeRightArrow.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/recordTypedWildcardPattern_nullable_beforeRightArrow.dart.expect
@@ -36,6 +36,7 @@
               handleWildcardPattern(null, _)
             endPattern(_)
             handleSwitchExpressionCasePattern(_)
+            handleSwitchExpressionCaseArrow(=>)
             handleLiteralInt(0)
           endSwitchExpressionCase((, null, =>, 0)
         endSwitchExpressionBlock(1, {, })
diff --git a/pkg/front_end/parser_testcases/patterns/recordTypedWildcardPattern_nullable_beforeRightArrow.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/recordTypedWildcardPattern_nullable_beforeRightArrow.dart.intertwined.expect
index 6f7042a..0de6fea 100644
--- a/pkg/front_end/parser_testcases/patterns/recordTypedWildcardPattern_nullable_beforeRightArrow.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/recordTypedWildcardPattern_nullable_beforeRightArrow.dart.intertwined.expect
@@ -84,6 +84,7 @@
                         listener: endPattern(_)
                       listener: handleSwitchExpressionCasePattern(_)
                       ensureFunctionArrow(_)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/switchExpression_onePattern_guarded.dart.expect b/pkg/front_end/parser_testcases/patterns/switchExpression_onePattern_guarded.dart.expect
index 7b51269..425756c 100644
--- a/pkg/front_end/parser_testcases/patterns/switchExpression_onePattern_guarded.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/switchExpression_onePattern_guarded.dart.expect
@@ -28,6 +28,7 @@
             endPattern(_)
             handleSwitchExpressionCasePattern(_)
             handleLiteralBool(true)
+            handleSwitchExpressionCaseArrow(=>)
             handleLiteralInt(0)
           endSwitchExpressionCase(_, when, =>, 0)
         endSwitchExpressionBlock(1, {, })
diff --git a/pkg/front_end/parser_testcases/patterns/switchExpression_onePattern_guarded.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/switchExpression_onePattern_guarded.dart.intertwined.expect
index c621929d..a5c8a602 100644
--- a/pkg/front_end/parser_testcases/patterns/switchExpression_onePattern_guarded.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/switchExpression_onePattern_guarded.dart.intertwined.expect
@@ -81,6 +81,7 @@
                               parseLiteralBool(when)
                                 listener: handleLiteralBool(true)
                       ensureFunctionArrow(true)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/switchExpression_onePattern_noTrailingComma.dart.expect b/pkg/front_end/parser_testcases/patterns/switchExpression_onePattern_noTrailingComma.dart.expect
index f1164a4..a22bebd 100644
--- a/pkg/front_end/parser_testcases/patterns/switchExpression_onePattern_noTrailingComma.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/switchExpression_onePattern_noTrailingComma.dart.expect
@@ -27,6 +27,7 @@
               handleWildcardPattern(null, _)
             endPattern(_)
             handleSwitchExpressionCasePattern(_)
+            handleSwitchExpressionCaseArrow(=>)
             handleLiteralInt(0)
           endSwitchExpressionCase(_, null, =>, 0)
         endSwitchExpressionBlock(1, {, })
diff --git a/pkg/front_end/parser_testcases/patterns/switchExpression_onePattern_noTrailingComma.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/switchExpression_onePattern_noTrailingComma.dart.intertwined.expect
index b1fe03d..f61efa2 100644
--- a/pkg/front_end/parser_testcases/patterns/switchExpression_onePattern_noTrailingComma.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/switchExpression_onePattern_noTrailingComma.dart.intertwined.expect
@@ -73,6 +73,7 @@
                         listener: endPattern(_)
                       listener: handleSwitchExpressionCasePattern(_)
                       ensureFunctionArrow(_)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/switchExpression_onePattern_trailingComma.dart.expect b/pkg/front_end/parser_testcases/patterns/switchExpression_onePattern_trailingComma.dart.expect
index f1164a4..a22bebd 100644
--- a/pkg/front_end/parser_testcases/patterns/switchExpression_onePattern_trailingComma.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/switchExpression_onePattern_trailingComma.dart.expect
@@ -27,6 +27,7 @@
               handleWildcardPattern(null, _)
             endPattern(_)
             handleSwitchExpressionCasePattern(_)
+            handleSwitchExpressionCaseArrow(=>)
             handleLiteralInt(0)
           endSwitchExpressionCase(_, null, =>, 0)
         endSwitchExpressionBlock(1, {, })
diff --git a/pkg/front_end/parser_testcases/patterns/switchExpression_onePattern_trailingComma.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/switchExpression_onePattern_trailingComma.dart.intertwined.expect
index b1fe03d..f61efa2 100644
--- a/pkg/front_end/parser_testcases/patterns/switchExpression_onePattern_trailingComma.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/switchExpression_onePattern_trailingComma.dart.intertwined.expect
@@ -73,6 +73,7 @@
                         listener: endPattern(_)
                       listener: handleSwitchExpressionCasePattern(_)
                       ensureFunctionArrow(_)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_bogusTokensAfterCase.dart.expect b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_bogusTokensAfterCase.dart.expect
index 90f892c..d295c92 100644
--- a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_bogusTokensAfterCase.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_bogusTokensAfterCase.dart.expect
@@ -34,6 +34,7 @@
               handleObjectPattern(int, null, null)
             endPattern())
             handleSwitchExpressionCasePattern())
+            handleSwitchExpressionCaseArrow(=>)
             handleLiteralInt(0)
           endSwitchExpressionCase(int, null, =>, 0)
           handleRecoverableError(Message[Template(ExpectedButGot), Expected '}' before this., null, {expected: }}], :, :)
diff --git a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_bogusTokensAfterCase.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_bogusTokensAfterCase.dart.intertwined.expect
index c63b757..a5af3d1 100644
--- a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_bogusTokensAfterCase.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_bogusTokensAfterCase.dart.intertwined.expect
@@ -74,6 +74,7 @@
                         listener: endPattern())
                       listener: handleSwitchExpressionCasePattern())
                       ensureFunctionArrow())
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_bogusTokensAfterCase_laterComma.dart.expect b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_bogusTokensAfterCase_laterComma.dart.expect
index dd17680..3bc6e27 100644
--- a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_bogusTokensAfterCase_laterComma.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_bogusTokensAfterCase_laterComma.dart.expect
@@ -35,6 +35,7 @@
               handleObjectPattern(int, null, null)
             endPattern())
             handleSwitchExpressionCasePattern())
+            handleSwitchExpressionCaseArrow(=>)
             handleLiteralInt(0)
           endSwitchExpressionCase(int, null, =>, 0)
           handleRecoverableError(Message[Template(ExpectedButGot), Expected '}' before this., null, {expected: }}], :, :)
diff --git a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_bogusTokensAfterCase_laterComma.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_bogusTokensAfterCase_laterComma.dart.intertwined.expect
index d0b2fc3..33d0b1e 100644
--- a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_bogusTokensAfterCase_laterComma.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_bogusTokensAfterCase_laterComma.dart.intertwined.expect
@@ -82,6 +82,7 @@
                                   listener: endPattern())
                                 listener: handleSwitchExpressionCasePattern())
                                 ensureFunctionArrow())
+                                listener: handleSwitchExpressionCaseArrow(=>)
                                 parseExpression(=>)
                                   looksLikeOuterPatternEquals(=>)
                                     skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_bogusTokensAfterCase_nestedComma.dart.expect b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_bogusTokensAfterCase_nestedComma.dart.expect
index 0acd440..f7e95a1 100644
--- a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_bogusTokensAfterCase_nestedComma.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_bogusTokensAfterCase_nestedComma.dart.expect
@@ -34,6 +34,7 @@
               handleObjectPattern(int, null, null)
             endPattern())
             handleSwitchExpressionCasePattern())
+            handleSwitchExpressionCaseArrow(=>)
             handleLiteralInt(0)
           endSwitchExpressionCase(int, null, =>, 0)
           handleRecoverableError(Message[Template(ExpectedButGot), Expected '}' before this., null, {expected: }}], :, :)
diff --git a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_bogusTokensAfterCase_nestedComma.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_bogusTokensAfterCase_nestedComma.dart.intertwined.expect
index c63b757..a5af3d1 100644
--- a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_bogusTokensAfterCase_nestedComma.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_bogusTokensAfterCase_nestedComma.dart.intertwined.expect
@@ -74,6 +74,7 @@
                         listener: endPattern())
                       listener: handleSwitchExpressionCasePattern())
                       ensureFunctionArrow())
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_caseKeyword.dart.expect b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_caseKeyword.dart.expect
index fe234e8..d9b6e79 100644
--- a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_caseKeyword.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_caseKeyword.dart.expect
@@ -39,6 +39,7 @@
               endConstantPattern(null)
             endPattern(1)
             handleSwitchExpressionCasePattern(1)
+            handleSwitchExpressionCaseArrow(=>)
             beginLiteralString('one')
             endLiteralString(0, 'one')
           endSwitchExpressionCase(case, null, =>, 'one')
@@ -50,6 +51,7 @@
               endConstantPattern(null)
             endPattern(2)
             handleSwitchExpressionCasePattern(2)
+            handleSwitchExpressionCaseArrow(=>)
             beginLiteralString('two')
             endLiteralString(0, 'two')
           endSwitchExpressionCase(case, null, =>, 'two')
diff --git a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_caseKeyword.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_caseKeyword.dart.intertwined.expect
index 1889336..a33793d 100644
--- a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_caseKeyword.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_caseKeyword.dart.intertwined.expect
@@ -79,6 +79,7 @@
                         listener: endPattern(1)
                       listener: handleSwitchExpressionCasePattern(1)
                       ensureFunctionArrow(1)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
@@ -106,6 +107,7 @@
                         listener: endPattern(2)
                       listener: handleSwitchExpressionCasePattern(2)
                       ensureFunctionArrow(2)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_colonInsteadOfArrow.dart.expect b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_colonInsteadOfArrow.dart.expect
index fe44a0f..4af4cc6 100644
--- a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_colonInsteadOfArrow.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_colonInsteadOfArrow.dart.expect
@@ -39,6 +39,7 @@
             endPattern(1)
             handleSwitchExpressionCasePattern(1)
             handleRecoverableError(Message[Template(ExpectedButGot), Expected '=>' before this., null, {expected: =>}], :, :)
+            handleSwitchExpressionCaseArrow(:)
             beginLiteralString('one')
             endLiteralString(0, 'one')
           endSwitchExpressionCase(1, null, :, 'one')
@@ -50,6 +51,7 @@
             endPattern(2)
             handleSwitchExpressionCasePattern(2)
             handleRecoverableError(Message[Template(ExpectedButGot), Expected '=>' before this., null, {expected: =>}], :, :)
+            handleSwitchExpressionCaseArrow(:)
             beginLiteralString('two')
             endLiteralString(0, 'two')
           endSwitchExpressionCase(2, null, :, 'two')
diff --git a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_colonInsteadOfArrow.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_colonInsteadOfArrow.dart.intertwined.expect
index 82732ae..2315610 100644
--- a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_colonInsteadOfArrow.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_colonInsteadOfArrow.dart.intertwined.expect
@@ -78,6 +78,7 @@
                       listener: handleSwitchExpressionCasePattern(1)
                       reportRecoverableError(:, Message[Template(ExpectedButGot), Expected '=>' before this., null, {expected: =>}])
                         listener: handleRecoverableError(Message[Template(ExpectedButGot), Expected '=>' before this., null, {expected: =>}], :, :)
+                      listener: handleSwitchExpressionCaseArrow(:)
                       parseExpression(:)
                         looksLikeOuterPatternEquals(:)
                           skipOuterPattern(:)
@@ -104,6 +105,7 @@
                       listener: handleSwitchExpressionCasePattern(2)
                       reportRecoverableError(:, Message[Template(ExpectedButGot), Expected '=>' before this., null, {expected: =>}])
                         listener: handleRecoverableError(Message[Template(ExpectedButGot), Expected '=>' before this., null, {expected: =>}], :, :)
+                      listener: handleSwitchExpressionCaseArrow(:)
                       parseExpression(:)
                         looksLikeOuterPatternEquals(:)
                           skipOuterPattern(:)
diff --git a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_defaultKeyword.dart.expect b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_defaultKeyword.dart.expect
index c92a064..b7734ed 100644
--- a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_defaultKeyword.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_defaultKeyword.dart.expect
@@ -34,6 +34,7 @@
               endConstantPattern(null)
             endPattern(1)
             handleSwitchExpressionCasePattern(1)
+            handleSwitchExpressionCaseArrow(=>)
             beginLiteralString('one')
             endLiteralString(0, 'one')
           endSwitchExpressionCase(1, null, =>, 'one')
@@ -42,6 +43,7 @@
             handleNoType(default)
             handleWildcardPattern(null, default)
             handleSwitchExpressionCasePattern(default)
+            handleSwitchExpressionCaseArrow(=>)
             beginLiteralString('other')
             endLiteralString(0, 'other')
           endSwitchExpressionCase(default, null, =>, 'other')
diff --git a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_defaultKeyword.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_defaultKeyword.dart.intertwined.expect
index 4e8d6ca..80bb65ca 100644
--- a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_defaultKeyword.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_defaultKeyword.dart.intertwined.expect
@@ -77,6 +77,7 @@
                         listener: endPattern(1)
                       listener: handleSwitchExpressionCasePattern(1)
                       ensureFunctionArrow(1)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
@@ -95,6 +96,7 @@
                       listener: handleWildcardPattern(null, default)
                       listener: handleSwitchExpressionCasePattern(default)
                       ensureFunctionArrow(default)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_illegalFunctionExpressionInGuard.dart.expect b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_illegalFunctionExpressionInGuard.dart.expect
index c63d812..fc22b851 100644
--- a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_illegalFunctionExpressionInGuard.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_illegalFunctionExpressionInGuard.dart.expect
@@ -35,6 +35,7 @@
             handleSwitchExpressionCasePattern(_)
             beginParenthesizedExpressionOrRecordLiteral(()
             endRecordLiteral((, 0, null)
+            handleSwitchExpressionCaseArrow(=>)
             handleLiteralBool(true)
           endSwitchExpressionCase(_, when, =>, true)
           handleRecoverableError(Message[Template(ExpectedButGot), Expected ',' before this., null, {expected: ,}], =>, =>)
@@ -44,6 +45,7 @@
               handleWildcardPattern(null, _)
             endPattern(_)
             handleSwitchExpressionCasePattern(_)
+            handleSwitchExpressionCaseArrow(=>)
             handleLiteralInt(2)
           endSwitchExpressionCase(_, null, =>, 2)
         endSwitchExpressionBlock(2, {, })
diff --git a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_illegalFunctionExpressionInGuard.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_illegalFunctionExpressionInGuard.dart.intertwined.expect
index 7dc3e32..6d0d203 100644
--- a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_illegalFunctionExpressionInGuard.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_illegalFunctionExpressionInGuard.dart.intertwined.expect
@@ -84,6 +84,7 @@
                                   ensureCloseParen((, ()
                                   listener: endRecordLiteral((, 0, null)
                       ensureFunctionArrow())
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
@@ -106,6 +107,7 @@
                         listener: endPattern(_)
                       listener: handleSwitchExpressionCasePattern(_)
                       ensureFunctionArrow(_)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_illegalFunctionExpressionInGuard_semicolon.dart.expect b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_illegalFunctionExpressionInGuard_semicolon.dart.expect
index 2731bc2..e87543a 100644
--- a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_illegalFunctionExpressionInGuard_semicolon.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_illegalFunctionExpressionInGuard_semicolon.dart.expect
@@ -35,6 +35,7 @@
             handleSwitchExpressionCasePattern(_)
             beginParenthesizedExpressionOrRecordLiteral(()
             endRecordLiteral((, 0, null)
+            handleSwitchExpressionCaseArrow(=>)
             handleLiteralBool(true)
           endSwitchExpressionCase(_, when, =>, true)
           handleRecoverableError(Message[Template(ExpectedButGot), Expected ',' before this., null, {expected: ,}], =>, =>)
@@ -44,6 +45,7 @@
               handleWildcardPattern(null, _)
             endPattern(_)
             handleSwitchExpressionCasePattern(_)
+            handleSwitchExpressionCaseArrow(=>)
             handleLiteralInt(2)
           endSwitchExpressionCase(_, null, =>, 2)
         endSwitchExpressionBlock(2, {, })
diff --git a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_illegalFunctionExpressionInGuard_semicolon.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_illegalFunctionExpressionInGuard_semicolon.dart.intertwined.expect
index d46e944..cf52a2c 100644
--- a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_illegalFunctionExpressionInGuard_semicolon.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_illegalFunctionExpressionInGuard_semicolon.dart.intertwined.expect
@@ -84,6 +84,7 @@
                                   ensureCloseParen((, ()
                                   listener: endRecordLiteral((, 0, null)
                       ensureFunctionArrow())
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
@@ -106,6 +107,7 @@
                         listener: endPattern(_)
                       listener: handleSwitchExpressionCasePattern(_)
                       ensureFunctionArrow(_)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_missingComma.dart.expect b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_missingComma.dart.expect
index ffd8b4a..f4e30d4 100644
--- a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_missingComma.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_missingComma.dart.expect
@@ -34,6 +34,7 @@
               handleObjectPattern(int, null, null)
             endPattern())
             handleSwitchExpressionCasePattern())
+            handleSwitchExpressionCaseArrow(=>)
             handleLiteralInt(0)
           endSwitchExpressionCase(int, null, =>, 0)
           handleRecoverableError(Message[Template(ExpectedButGot), Expected ',' before this., null, {expected: ,}], double, double)
@@ -44,6 +45,7 @@
               handleObjectPattern(double, null, null)
             endPattern())
             handleSwitchExpressionCasePattern())
+            handleSwitchExpressionCaseArrow(=>)
             handleLiteralInt(1)
           endSwitchExpressionCase(double, null, =>, 1)
         endSwitchExpressionBlock(2, {, })
diff --git a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_missingComma.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_missingComma.dart.intertwined.expect
index c4e3603..b6ac0a7 100644
--- a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_missingComma.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_missingComma.dart.intertwined.expect
@@ -74,6 +74,7 @@
                         listener: endPattern())
                       listener: handleSwitchExpressionCasePattern())
                       ensureFunctionArrow())
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
@@ -98,6 +99,7 @@
                         listener: endPattern())
                       listener: handleSwitchExpressionCasePattern())
                       ensureFunctionArrow())
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_semicolonInsteadOfComma.dart.expect b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_semicolonInsteadOfComma.dart.expect
index 8aac613..9129710 100644
--- a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_semicolonInsteadOfComma.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_semicolonInsteadOfComma.dart.expect
@@ -34,6 +34,7 @@
               endConstantPattern(null)
             endPattern(1)
             handleSwitchExpressionCasePattern(1)
+            handleSwitchExpressionCaseArrow(=>)
             beginLiteralString('one')
             endLiteralString(0, 'one')
           endSwitchExpressionCase(1, null, =>, 'one')
@@ -45,6 +46,7 @@
               endConstantPattern(null)
             endPattern(2)
             handleSwitchExpressionCasePattern(2)
+            handleSwitchExpressionCaseArrow(=>)
             beginLiteralString('two')
             endLiteralString(0, 'two')
           endSwitchExpressionCase(2, null, =>, 'two')
diff --git a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_semicolonInsteadOfComma.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_semicolonInsteadOfComma.dart.intertwined.expect
index f6c9183..b82c67a 100644
--- a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_semicolonInsteadOfComma.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_semicolonInsteadOfComma.dart.intertwined.expect
@@ -77,6 +77,7 @@
                         listener: endPattern(1)
                       listener: handleSwitchExpressionCasePattern(1)
                       ensureFunctionArrow(1)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
@@ -104,6 +105,7 @@
                         listener: endPattern(2)
                       listener: handleSwitchExpressionCasePattern(2)
                       ensureFunctionArrow(2)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_unmatchedLessThanInTokensToBeSkipped.dart.expect b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_unmatchedLessThanInTokensToBeSkipped.dart.expect
index 4207e13..5efb4ca 100644
--- a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_unmatchedLessThanInTokensToBeSkipped.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_unmatchedLessThanInTokensToBeSkipped.dart.expect
@@ -34,6 +34,7 @@
               endConstantPattern(null)
             endPattern(1)
             handleSwitchExpressionCasePattern(1)
+            handleSwitchExpressionCaseArrow(=>)
             handleLiteralInt(2)
             beginBinaryExpression(>)
               handleLiteralInt(1)
diff --git a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_unmatchedLessThanInTokensToBeSkipped.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_unmatchedLessThanInTokensToBeSkipped.dart.intertwined.expect
index 6031a09..03ec22f 100644
--- a/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_unmatchedLessThanInTokensToBeSkipped.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/switchExpression_recovery_unmatchedLessThanInTokensToBeSkipped.dart.intertwined.expect
@@ -77,6 +77,7 @@
                         listener: endPattern(1)
                       listener: handleSwitchExpressionCasePattern(1)
                       ensureFunctionArrow(1)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/switchExpression_twoPatterns.dart.expect b/pkg/front_end/parser_testcases/patterns/switchExpression_twoPatterns.dart.expect
index 6acb9f8..9e8eefd 100644
--- a/pkg/front_end/parser_testcases/patterns/switchExpression_twoPatterns.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/switchExpression_twoPatterns.dart.expect
@@ -29,6 +29,7 @@
               handleWildcardPattern(null, _)
             endPattern(_)
             handleSwitchExpressionCasePattern(_)
+            handleSwitchExpressionCaseArrow(=>)
             handleLiteralInt(0)
           endSwitchExpressionCase(int, null, =>, 0)
           beginSwitchExpressionCase()
@@ -37,6 +38,7 @@
               handleWildcardPattern(null, _)
             endPattern(_)
             handleSwitchExpressionCasePattern(_)
+            handleSwitchExpressionCaseArrow(=>)
             handleLiteralInt(1)
           endSwitchExpressionCase(_, null, =>, 1)
         endSwitchExpressionBlock(2, {, })
diff --git a/pkg/front_end/parser_testcases/patterns/switchExpression_twoPatterns.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/switchExpression_twoPatterns.dart.intertwined.expect
index 26aa1da..8a8fd1f 100644
--- a/pkg/front_end/parser_testcases/patterns/switchExpression_twoPatterns.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/switchExpression_twoPatterns.dart.intertwined.expect
@@ -75,6 +75,7 @@
                         listener: endPattern(_)
                       listener: handleSwitchExpressionCasePattern(_)
                       ensureFunctionArrow(_)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
@@ -94,6 +95,7 @@
                         listener: endPattern(_)
                       listener: handleSwitchExpressionCasePattern(_)
                       ensureFunctionArrow(_)
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
diff --git a/pkg/front_end/parser_testcases/patterns/syntheticIdentifier_insideSwitchExpression.dart.expect b/pkg/front_end/parser_testcases/patterns/syntheticIdentifier_insideSwitchExpression.dart.expect
index 2971de0..8e01050 100644
--- a/pkg/front_end/parser_testcases/patterns/syntheticIdentifier_insideSwitchExpression.dart.expect
+++ b/pkg/front_end/parser_testcases/patterns/syntheticIdentifier_insideSwitchExpression.dart.expect
@@ -51,6 +51,7 @@
             endPattern()
             handleSwitchExpressionCasePattern()
             handleRecoverableError(Message[Template(ExpectedButGot), Expected '=>' before this., null, {expected: =>}], if, if)
+            handleSwitchExpressionCaseArrow(=>)
             handleRecoverableError(Message[Template(ExpectedIdentifier), Expected an identifier, but got 'if'., Try inserting an identifier before 'if'., {lexeme: if}], if, if)
             handleIdentifier(, expression)
             handleSendWithoutArguments(, , if)
diff --git a/pkg/front_end/parser_testcases/patterns/syntheticIdentifier_insideSwitchExpression.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/syntheticIdentifier_insideSwitchExpression.dart.intertwined.expect
index 8bd98d9..40978dd 100644
--- a/pkg/front_end/parser_testcases/patterns/syntheticIdentifier_insideSwitchExpression.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/patterns/syntheticIdentifier_insideSwitchExpression.dart.intertwined.expect
@@ -88,6 +88,7 @@
                           reportRecoverableError(if, Message[Template(ExpectedButGot), Expected '=>' before this., null, {expected: =>}])
                             listener: handleRecoverableError(Message[Template(ExpectedButGot), Expected '=>' before this., null, {expected: =>}], if, if)
                           rewriter()
+                      listener: handleSwitchExpressionCaseArrow(=>)
                       parseExpression(=>)
                         looksLikeOuterPatternEquals(=>)
                           skipOuterPattern(=>)
diff --git a/pkg/front_end/test/parser_test_listener.dart b/pkg/front_end/test/parser_test_listener.dart
index 9aa8444..f7265a4 100644
--- a/pkg/front_end/test/parser_test_listener.dart
+++ b/pkg/front_end/test/parser_test_listener.dart
@@ -4013,6 +4013,15 @@
   }
 
   @override
+  void handleSwitchExpressionCaseArrow(Token arrow) {
+    seen(arrow);
+    doPrint(
+      'handleSwitchExpressionCaseArrow('
+      '$arrow)',
+    );
+  }
+
+  @override
   void handleSwitchExpressionCasePattern(Token token) {
     seen(token);
     doPrint(