Skip to content

Commit

Permalink
chore: reformat code
Browse files Browse the repository at this point in the history
  • Loading branch information
kunli2 committed Nov 28, 2023
1 parent df26d6d commit aa72ff0
Showing 1 changed file with 26 additions and 27 deletions.
53 changes: 26 additions & 27 deletions src/main/java/org/openrewrite/kotlin/internal/PsiTreePrinter.java
Original file line number Diff line number Diff line change
Expand Up @@ -377,33 +377,32 @@ private static String printType(Tree tree) {

private static String printTreeElement(Tree tree) {
// skip some specific types printed in the output to make the output looks clean
if (tree instanceof J.CompilationUnit
|| tree instanceof J.ClassDeclaration
|| tree instanceof J.Block
|| tree instanceof J.Empty
|| tree instanceof J.Try
|| tree instanceof J.Try.Catch
|| tree instanceof J.ForLoop
|| tree instanceof J.WhileLoop
|| tree instanceof J.DoWhileLoop
|| tree instanceof J.Lambda
|| tree instanceof J.Lambda.Parameters
|| tree instanceof J.If
|| tree instanceof J.If.Else
|| tree instanceof J.EnumValueSet
|| tree instanceof J.TypeParameter
|| tree instanceof K.ClassDeclaration
|| tree instanceof K.CompilationUnit
|| tree instanceof K.SpreadArgument
|| tree instanceof K.StatementExpression
|| tree instanceof K.KString
|| tree instanceof K.KString.Value
|| tree instanceof K.ExpressionStatement
|| tree instanceof K.FunctionType
|| tree instanceof K.ListLiteral
|| tree instanceof K.When
|| tree instanceof J.Package
|| tree instanceof J.ForEachLoop
if (tree instanceof J.CompilationUnit ||
tree instanceof J.ClassDeclaration ||
tree instanceof J.Block ||
tree instanceof J.Empty||
tree instanceof J.Try ||
tree instanceof J.Try.Catch ||
tree instanceof J.ForLoop ||
tree instanceof J.WhileLoop ||
tree instanceof J.DoWhileLoop ||
tree instanceof J.Lambda ||
tree instanceof J.Lambda.Parameters ||
tree instanceof J.If ||
tree instanceof J.If.Else ||
tree instanceof J.EnumValueSet ||
tree instanceof J.TypeParameter ||
tree instanceof K.ClassDeclaration ||
tree instanceof K.CompilationUnit ||
tree instanceof K.SpreadArgument ||
tree instanceof K.StatementExpression ||
tree instanceof K.KString ||
tree instanceof K.KString.Value ||
tree instanceof K.ExpressionStatement ||
tree instanceof K.FunctionType ||
tree instanceof K.ListLiteral ||
tree instanceof K.When || tree instanceof J.Package ||
tree instanceof J.ForEachLoop
) {
return "";
}
Expand Down

0 comments on commit aa72ff0

Please sign in to comment.