aboutsummaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-02-17 23:27:02 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-02-17 23:27:02 -0500
commit86f3a8054445ffe8650b7da7450234414b5b1789 (patch)
tree7dd6b1a278d85ca821eb608caf22231a773b2ea1 /compile.c
parent20b4c6f4973adf52ed3eef57df3aa8d19fef554c (diff)
Split out parts into appropriate headers
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/compile.c b/compile.c
index 08193f38..10701866 100644
--- a/compile.c
+++ b/compile.c
@@ -74,9 +74,9 @@ CORD compile(env_t *env, ast_t *ast)
return CORD_from_char_star(buf);
}
case Not: return CORD_asprintf("not(%r)", compile(env, Match(ast, Not)->value));
- case Negative: return CORD_asprintf("-(%r)", compile(env, Match(ast, Not)->value));
- case HeapAllocate: return CORD_asprintf("$heap(%r)", compile(env, Match(ast, Not)->value));
- case StackReference: return CORD_asprintf("$stack(%r)", compile(env, Match(ast, Not)->value));
+ case Negative: return CORD_asprintf("-(%r)", compile(env, Match(ast, Negative)->value));
+ case HeapAllocate: return CORD_asprintf("$heap(%r)", compile(env, Match(ast, HeapAllocate)->value));
+ case StackReference: return CORD_asprintf("$stack(%r)", compile(env, Match(ast, StackReference)->value));
case BinaryOp: {
auto binop = Match(ast, BinaryOp);
CORD lhs = compile(env, binop->lhs);