diff options
author | nea <nea@nea.moe> | 2023-08-21 19:41:29 +0200 |
---|---|---|
committer | nea <nea@nea.moe> | 2023-08-21 19:41:29 +0200 |
commit | 39f1849edcaa9005814525cd13f76a5daaa15ae0 (patch) | |
tree | 4d3a34f96f53443a92823079563a2c9bbdeba7e7 /src/CoreBindings.kt | |
parent | ad9429d1cae70baf9b561090bb33ab2941d2a3a5 (diff) | |
download | nealisp-39f1849edcaa9005814525cd13f76a5daaa15ae0.tar.gz nealisp-39f1849edcaa9005814525cd13f76a5daaa15ae0.tar.bz2 nealisp-39f1849edcaa9005814525cd13f76a5daaa15ae0.zip |
Foreign objects
Diffstat (limited to 'src/CoreBindings.kt')
-rw-r--r-- | src/CoreBindings.kt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/CoreBindings.kt b/src/CoreBindings.kt index b90072e..2208b8c 100644 --- a/src/CoreBindings.kt +++ b/src/CoreBindings.kt @@ -118,6 +118,7 @@ object CoreBindings { is LispData.LispString -> thing.string is LispData.LispHash -> thing.map.asIterable().joinToString(", ", "{", "}") { it.key + ": " + it.value } is LispData.LispNumber -> thing.value.toString() + is LispData.ForeignObject<*> -> "<foreign ${thing.obj}>" is LispData.LispInterpretedCallable -> "<function ${thing.name ?: "<anonymous>"} ${thing.argNames} ${thing.body.toSource()}>" } } @@ -225,6 +226,7 @@ object CoreBindings { LispData.LispNil -> LispData.Atom("nil") is LispData.LispHash -> LispData.Atom("hash") is LispData.LispNode -> LispData.Atom("ast") + is LispData.ForeignObject<*> -> LispData.Atom("foreign") is LispData.LispNumber -> LispData.Atom("number") is LispData.LispString -> LispData.Atom("string") } |