about summary refs log tree commit diff
path: root/pkg/lang/vm/text
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2022-07-06 14:06:20 +0200
committerMel <einebeere@gmail.com>2022-07-06 14:06:20 +0200
commitb16b70fd40ffc72ff861afe0517cba0e37ba1145 (patch)
tree1969a77f9c3d00160d53ffbe2f4b6ffa7d408165 /pkg/lang/vm/text
parent32ec3e1186b3ed29e910ad60a18f956b823ddc23 (diff)
downloadjinx-b16b70fd40ffc72ff861afe0517cba0e37ba1145.tar.zst
jinx-b16b70fd40ffc72ff861afe0517cba0e37ba1145.zip
Implement most of the binary operations
Diffstat (limited to 'pkg/lang/vm/text')
-rw-r--r--pkg/lang/vm/text/op.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/pkg/lang/vm/text/op.go b/pkg/lang/vm/text/op.go
index 17f4847..d438a25 100644
--- a/pkg/lang/vm/text/op.go
+++ b/pkg/lang/vm/text/op.go
@@ -28,10 +28,15 @@ var (
 		code.OpAnchorType:   "anchor_type",
 		code.OpAdd:          "add",
 		code.OpSub:          "sub",
+		code.OpMul:          "mul",
+		code.OpDiv:          "div",
 		code.OpMod:          "mod",
-		code.OpIndex:        "index",
-		code.OpLt:          "lt",
+		code.OpEq:           "eq",
+		code.OpGt:           "gt",
+		code.OpLt:           "lt",
 		code.OpLte:          "lte",
+		code.OpGte:          "gte",
+		code.OpIndex:        "index",
 		code.OpCall:         "call",
 		code.OpJmp:          "jmp",
 		code.OpJt:           "jt",