I am trying to extract an AST from a scala suce file. I simplified the code (only the corresponding code) to the following.
trait GetAST {
val settings = new Settings
val global = new Global(settings, new ConsoleReporter(settings))
def getSt = "hello"
}
object Tre extends GetAST {
def main(args:Array[String])
{
println(getSt.getClass)
println("exiting program")
}
}
The above code compiles and works fine. But the problem is that the program does not exit. After printing, “exit the program”, the invitation does not appear. I have to use ^ c to exit. Any idea what might be the problem
source
share