Kotlin Parser in Kotlin?

Not surprising to me. I think that is the case and I think it’s the one and only true parser. (well, the compiler has an IR and there are some other details, but yes, that PSI stuff is the only place that has the proper AST that I’m aware of.) I’m working with the stuff in the org.jetbrains.kotlin.psi package now and it’s not that bad at all, just a lot of helpers and utils to clutter it. I am transforming it into my own AST that will be easier to use if you want to wait a few days.

1 Like