提交 0086652b 编写于 作者: C CyrusNajmabadi

Remove usage of TypeSwitch.

上级 a8629bfb
......@@ -39,14 +39,13 @@ internal class ReturnStatementHighlighter : AbstractKeywordHighlighter<ReturnSta
/// </summary>
private void HighlightRelatedKeywords(SyntaxNode node, List<TextSpan> spans)
{
node.TypeSwitch(
(ReturnStatementSyntax statement) =>
{
switch (node)
{
case ReturnStatementSyntax statement:
spans.Add(statement.ReturnKeyword.Span);
spans.Add(EmptySpan(statement.SemicolonToken.Span.End));
},
_ =>
{
break;
default:
foreach (var child in node.ChildNodes())
{
// Only recurse if we have anything to do
......@@ -55,7 +54,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.
先完成此消息的编辑!
想要评论请 注册