summaryrefslogtreecommitdiff
path: root/src/LispData.kt
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-08-11 02:26:00 +0200
committernea <nea@nea.moe>2023-08-11 02:26:00 +0200
commit69f8367389c9d6f60ca594053d9d470e5a8ec999 (patch)
tree4fe2d341ca9ec9b8aaa0ec5cb18c53bf63265844 /src/LispData.kt
parent912c9918d9a5afbfb023b650bed6e2754f030d5e (diff)
downloadnealisp-69f8367389c9d6f60ca594053d9d470e5a8ec999.tar.gz
nealisp-69f8367389c9d6f60ca594053d9d470e5a8ec999.tar.bz2
nealisp-69f8367389c9d6f60ca594053d9d470e5a8ec999.zip
Add output capture and more test reports
Diffstat (limited to 'src/LispData.kt')
-rw-r--r--src/LispData.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/LispData.kt b/src/LispData.kt
index 8eac3f7..97fcc36 100644
--- a/src/LispData.kt
+++ b/src/LispData.kt
@@ -43,7 +43,7 @@ sealed class LispData {
args.drop(argNames.size - 1).map { executionContext.resolveValue(stackFrame, it) })
)
} else if (argNames.size != args.size) {
- return executionContext.reportError(
+ return stackFrame.reportError(
"Expected ${argNames.size} arguments, got ${args.size} instead",
callsite
)
@@ -85,7 +85,7 @@ sealed class LispData {
args: List<LispAst.LispNode>
): LispData {
val mappedArgs = args.map { executionContext.resolveValue(stackFrame, it) }
- return callable.invoke(mappedArgs) { executionContext.reportError(it, callsite) }
+ return callable.invoke(mappedArgs) { stackFrame.reportError(it, callsite) }
}
}
}