$ echo 'fun f() {}' | ./ktlint/target/ktlint --print-ast --color --stdin
1: ~.psi.KtFile (FILE)
1: ~.psi.KtPackageDirective (PACKAGE_DIRECTIVE) ""
1: ~.psi.KtImportList (IMPORT_LIST) ""
1: ~.psi.KtScript (SCRIPT)
1: ~.psi.KtBlockExpression (BLOCK)
1: ~.psi.KtNamedFunction (FUN)
1: ~.c.i.p.impl.source.tree.LeafPsiElement (FUN_KEYWORD) "fun"
1: ~.c.i.p.impl.source.tree.PsiWhiteSpaceImpl (WHITE_SPACE) " "
1: ~.c.i.p.impl.source.tree.LeafPsiElement (IDENTIFIER) "f"
1: ~.psi.KtParameterList (VALUE_PARAMETER_LIST)
1: ~.c.i.p.impl.source.tree.LeafPsiElement (LPAR) "("
1: ~.c.i.p.impl.source.tree.LeafPsiElement (RPAR) ")"
1: ~.c.i.p.impl.source.tree.PsiWhiteSpaceImpl (WHITE_SPACE) " "
1: ~.psi.KtBlockExpression (BLOCK)
1: ~.c.i.p.impl.source.tree.LeafPsiElement (LBRACE) "{"
1: ~.c.i.p.impl.source.tree.LeafPsiElement (RBRACE) "}"
1: ~.c.i.p.impl.source.tree.PsiWhiteSpaceImpl (WHITE_SPACE) "\n"
format: <line_number:> <node.psi::class> (<node.elementType>) "<node.text>"
legend: ~ = org.jetbrains.kotlin, c.i.p = com.intellij.psi