diff options
author | nea <nea@nea.moe> | 2023-08-11 02:26:00 +0200 |
---|---|---|
committer | nea <nea@nea.moe> | 2023-08-11 02:26:00 +0200 |
commit | 69f8367389c9d6f60ca594053d9d470e5a8ec999 (patch) | |
tree | 4fe2d341ca9ec9b8aaa0ec5cb18c53bf63265844 /src/LispData.kt | |
parent | 912c9918d9a5afbfb023b650bed6e2754f030d5e (diff) | |
download | nealisp-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.kt | 4 |
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) } } } } |