There seem to be many PsiElementVisitor, PsiElementProcessor, SyntaxTraverser classes which all provide mechanisms for traversing a PsiFile. And one can also always manually recurse through either PsiElements or ASTNodes at any time.
I'm trying to build a "compiler" which reads an entire PsiFile (probably Top-Down), and processes it into a binary format. Which of the above paradigms is best-suited for this purpose? Does Jetbrains have examples? I found the Kotlin plugin was a very helpful reference for parsing and constructing a PSI, but I've had less luck finding good examples of processing/compiling a PSI.
Thanks, and sorry that this is such a high-level question.