diff options
author | nea <nea@nea.moe> | 2023-08-21 19:24:30 +0200 |
---|---|---|
committer | nea <nea@nea.moe> | 2023-08-21 19:24:30 +0200 |
commit | ad9429d1cae70baf9b561090bb33ab2941d2a3a5 (patch) | |
tree | 4ee3307fffbb8704e406619cc7918b5089e9f278 /test | |
parent | 62244f488cf570471ecb9de919ecbf961508757c (diff) | |
download | nealisp-ad9429d1cae70baf9b561090bb33ab2941d2a3a5.tar.gz nealisp-ad9429d1cae70baf9b561090bb33ab2941d2a3a5.tar.bz2 nealisp-ad9429d1cae70baf9b561090bb33ab2941d2a3a5.zip |
Varargs support
Diffstat (limited to 'test')
-rw-r--r-- | test/res/scratch.lisp | 2 | ||||
-rw-r--r-- | test/src/TestLisp.kt | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/test/res/scratch.lisp b/test/res/scratch.lisp index 00517a8..3fc6ed7 100644 --- a/test/res/scratch.lisp +++ b/test/res/scratch.lisp @@ -25,4 +25,4 @@ (debuglog "============") (debuglog "Running tests") -(debuglog "This should be 1.0" (funny-method 1.1 "test" false (test 1 2 3 4 /)))
\ No newline at end of file +(debuglog "This should be 1.0" (funny-method 1.1 "test" false (test 1 2 3 4 /) :test))
\ No newline at end of file diff --git a/test/src/TestLisp.kt b/test/src/TestLisp.kt index 5f56d68..0e5d2d8 100644 --- a/test/src/TestLisp.kt +++ b/test/src/TestLisp.kt @@ -9,10 +9,10 @@ object T object TestBindings { @LispBinding("funny-method") - fun funnyMethod(arg: Int, test: String, boolean: Boolean, ast: LispAst): LispData { + fun funnyMethod(arg: Int, test: String, boolean: Boolean, vararg ast: LispAst): LispData { if (boolean) println("From java: $test") - println(ast.toSource()) + ast.forEach { println(it.toSource()) } return LispData.LispNumber(arg.toDouble()) } |