提交 461b7a60 编写于 作者: C CyrusNajmabadi

Remove usage of TypeSwitch.

上级 603a074c
......@@ -39,18 +39,17 @@ internal class YieldStatementHighlighter : AbstractKeywordHighlighter<YieldState
/// </summary>
private void HighlightRelatedKeywords(SyntaxNode node, List<TextSpan> spans)
{
node.TypeSwitch(
(YieldStatementSyntax statement) =>
{
switch (node)
{
case YieldStatementSyntax statement:
spans.Add(
TextSpan.FromBounds(
statement.YieldKeyword.SpanStart,
statement.ReturnOrBreakKeyword.Span.End));
spans.Add(EmptySpan(statement.SemicolonToken.Span.End));
},
_ =>
{
break;
default:
foreach (var child in node.ChildNodes())
{
// Only recurse if we have anything to do
......@@ -59,7 +58,8 @@ private void HighlightRelatedKeywords(SyntaxNode node, List<TextSpan> spans)
HighlightRelatedKeywords(child, spans);
}
}
});
break;
}
}
}
}
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册