Migrate import evaluator to Kotlin

This commit is contained in:
2020-03-11 22:58:28 +01:00
parent a256db117e
commit 10a7dc8823
6 changed files with 64 additions and 15 deletions

View File

@@ -24,7 +24,7 @@ data class CallStackFrame(
}
fun getVariable(name: String): Value {
return scopes.lastOrNull { it.containsKey(name) }?.get(name) ?: throw RuntimeException("Variable `$name` not found")
return scopes.lastOrNull { it.containsKey(name) }?.get(name) ?: throw RuntimeException("Undefined variable `$name`")
}
fun prettyScope() {