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.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Kotlin Compiler API
|
0 | 1787 | June 23, 2017 | |
Writing a compiler in Kotlin | 3 | 2481 | January 12, 2023 | |
Which kotlin parser to use from java | 1 | 1240 | March 30, 2020 | |
Kastree - Simple Kotlin Source AST and Syntax Parsing | 2 | 3246 | July 27, 2018 | |
What are my options for auto code generation from text file? | 3 | 1021 | March 1, 2023 |