Created
July 11, 2013 12:26
-
-
Save edofic/5975013 to your computer and use it in GitHub Desktop.
scala runtime compilation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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