Skip to content

Instantly share code, notes, and snippets.

@edofic
Created July 11, 2013 12:26
Show Gist options
  • Save edofic/5975013 to your computer and use it in GitHub Desktop.
Save edofic/5975013 to your computer and use it in GitHub Desktop.
scala runtime compilation
val compile = {
import tools.reflect.ToolBox
val c = reflect.runtime.currentMirror
val tb = c.mkToolBox()
(src: String) => tb compile (tb parse (imports+src))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment