aboutsummaryrefslogtreecommitdiff
path: root/src/compile.zig
diff options
context:
space:
mode:
authorMathias Magnusson <mathias@magnusson.space>2025-06-01 00:58:19 +0200
committerMathias Magnusson <mathias@magnusson.space>2025-06-01 01:07:13 +0200
commit69b66367be54dc2029adc32544a5f709fc1ef1a2 (patch)
tree7f84e2aa6df34bc83e991d13d1d159c29e02b425 /src/compile.zig
parentfed87e2006790fd3d0dbf41dc77ee4e4cc47fb16 (diff)
downloadhuginn-69b66367be54dc2029adc32544a5f709fc1ef1a2.tar.gz
add subtraction
Diffstat (limited to 'src/compile.zig')
-rw-r--r--src/compile.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compile.zig b/src/compile.zig
index c723842..2bf404d 100644
--- a/src/compile.zig
+++ b/src/compile.zig
@@ -33,6 +33,7 @@ pub const Instr = struct {
const Op = enum {
add,
+ sub,
};
pub fn sources(self: BinOp) Sources {
@@ -116,6 +117,7 @@ const CompileContext = struct {
.rhs = rhs,
.op = switch (binop.op) {
.plus => .add,
+ .minus => .sub,
},
},
},