未验证 提交 2d177fb8 编写于 作者: J Julien Couvreur 提交者: GitHub

Merge pull request #28832 from kuskmen/issue28809

Fixed typo in one of the rewriters.
......@@ -1515,7 +1515,7 @@ public bool IsDeclaration(SyntaxNode node)
// First, annotate the context node in the tree so that we can find it again
// after we've done all the rewriting.
// var currentRoot = root.ReplaceNode(contextNode, contextNode.WithAdditionalAnnotations(s_annotation));
newRoot = new AddFirstMissingCloseBaceRewriter(contextNode).Visit(root);
newRoot = new AddFirstMissingCloseBraceRewriter(contextNode).Visit(root);
newContextNode = newRoot.GetAnnotatedNodes(s_annotation).Single();
}
......@@ -1702,13 +1702,13 @@ public override bool IsShebangDirectiveTrivia(SyntaxTrivia trivia)
public override bool IsPreprocessorDirective(SyntaxTrivia trivia)
=> SyntaxFacts.IsPreprocessorDirective(trivia.Kind());
private class AddFirstMissingCloseBaceRewriter : CSharpSyntaxRewriter
private class AddFirstMissingCloseBraceRewriter : CSharpSyntaxRewriter
{
private readonly SyntaxNode _contextNode;
private bool _seenContextNode = false;
private bool _addedFirstCloseCurly = false;
public AddFirstMissingCloseBaceRewriter(SyntaxNode contextNode)
public AddFirstMissingCloseBraceRewriter(SyntaxNode contextNode)
{
_contextNode = contextNode;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册