aboutsummaryrefslogtreecommitdiff
path: root/chunk.d
diff options
context:
space:
mode:
Diffstat (limited to 'chunk.d')
-rw-r--r--chunk.d7
1 files changed, 6 insertions, 1 deletions
diff --git a/chunk.d b/chunk.d
index 47a2d7e..55772dc 100644
--- a/chunk.d
+++ b/chunk.d
@@ -160,7 +160,11 @@ class List : Seq {
if (this.inner.length == 0) {
return "nil";
} else {
- return format("list ('%s' + %d)", printableValue(this.inner[0]), this.inner.length - 1);
+ string[] ret;
+ foreach (Value val ; this.inner) {
+ ret ~= printableValue(val);
+ }
+ return format("(%s)", join(ret, " "));
}
}
}
@@ -219,6 +223,7 @@ enum OpCode {
// RANDOM
OP_NIL,
+ OP_PRINT,
// FUNCTIONS
OP_CALL,