Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import scala.reflect.runtime.universe._
import scala.tools.reflect.{ToolBox, ToolBoxError}
val toolbox = runtimeMirror(getClass.getClassLoader).mkToolBox()
val source = "class Foo"
val tree = toolbox.parse(source)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment