StatementSyntax GetInsideStatement(StatementSyntax singleStatement) { if (singleStatement is BlockSyntax newBlockStatement) { if ((singleStatement = GetInsideStatement(newBlockStatement)) == null) { return(null); } } if (singleStatement.HasNoneWhitespaceTrivia()) { return(null); } return(singleStatement); }