aboutsummaryrefslogtreecommitdiff
path: root/compiler.d
diff options
context:
space:
mode:
authormryouse2023-06-06 21:58:12 -0400
committermryouse2023-06-06 21:58:12 -0400
commita09fa18356785aa16121328fc9f66d41d6ca2543 (patch)
tree405e5607027d0845857e663af3fc9d1e5f5797f2 /compiler.d
parentb610fff5f3b94e8545f82c067076d194492223f7 (diff)
bugfix: compile the interior of ->string
Diffstat (limited to 'compiler.d')
-rw-r--r--compiler.d7
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler.d b/compiler.d
index 51fca25..675ec4c 100644
--- a/compiler.d
+++ b/compiler.d
@@ -701,6 +701,12 @@ class Compiler {
this.func.chunk.writeOp(OpCode.OP_IS_NIL, args[0].line);
}
+ void compileToString(Form[] args) {
+ foreach (Form f; args) {
+ this.resolve(f);
+ }
+ }
+
@@ -828,6 +834,7 @@ class Compiler {
case "->string":
// does nothing at the moment, as primarily used for printing
// and everything can be printed
+ this.compileToString(cons.tail);
break;
// LISTS