diff options
| author | mryouse | 2023-06-01 22:47:43 -0400 |
|---|---|---|
| committer | mryouse | 2023-06-01 22:47:43 -0400 |
| commit | b66702e49ab7f90a348bb2bea015fd5901c457d8 (patch) | |
| tree | d87ed09ea6446f50964bf23bf5b810638ad3efc4 /chunk.d | |
| parent | af07e3fba55ef98aabd54057c6e3433734b81111 (diff) | |
add print (no escape sequences) and REPL returns
Diffstat (limited to 'chunk.d')
| -rw-r--r-- | chunk.d | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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, |
