replace

fun replace(source: String): String?

Compiles source and switches to it if it worked. Answers the compiler's message, or null.