Reputation: 37
How can I turn scala program into AST and operate with it programatically, from java/scala?
Upvotes: 1
Views: 1341
Reputation: 2468
I know this is an old question but you can have a look at scalameta :
Library to read, analyze, transform and generate Scala programs
Upvotes: 0
Reputation: 65
You can parse scala program source code.
Take a look to parboiled2 PEG parser. As an examle it have scala parser implementation
https://github.com/sirthias/parboiled2/tree/master/scalaParser/src/main/scala/scalaparser
Upvotes: 1