public override SyntaxNode VisitUsingStatement(UsingStatementSyntax node) { node = (UsingStatementSyntax)base.VisitUsingStatement(node); if (SimplifyNestedUsingStatementAnalyzer.ContainsEmbeddableUsingStatement(node)) { var block = (BlockSyntax)node.Statement; SyntaxToken closeParen = node.CloseParenToken; SyntaxTriviaList trailing = closeParen.TrailingTrivia; if (!trailing.Any(SyntaxKind.EndOfLineTrivia)) { trailing = trailing.EmptyIfWhitespace().AddRange(block.OpenBraceToken.TrailingTrivia); closeParen = closeParen.WithTrailingTrivia(trailing); } node = node.Update( usingKeyword: node.UsingKeyword, openParenToken: node.OpenParenToken, declaration: node.Declaration, expression: node.Expression, closeParenToken: closeParen, statement: block.Statements[0]); } return(node); }