compile

fun compile(code: String, dependencyCodes: List<String> = emptyList(), allowCompilationErrors: Boolean = false): KtFile

Compiles a given code string using Kotlin's Analysis API.

Throws

if the given code snippet does not compile