Kotlin Parser in Kotlin?

Ok, the code I put at GitHub - cretz/kastree: Simple Kotlin Source AST and Syntax Parsing, Editing, and Writing will let you parse a string of code into a clean AST. While there are some integration tests against the PSI corpus, I don’t have any tests on the validity just yet. It’s not quite a library yet (my needs require that I make a mutating Visitor and Writer), the AST and the PSI-to-AST converter are sound.

1 Like