about summary refs log tree commit diff
path: root/pkg/lang/ast/op.go
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2022-04-20 02:48:45 +0200
committerMel <einebeere@gmail.com>2022-04-20 02:48:45 +0200
commit20bc0c2243888900d2f04328e57ad2d7ca0a2403 (patch)
tree6f0fc535fd8a74eb8f91c4a35fa3c32f012f0a59 /pkg/lang/ast/op.go
parentdb3dd28cdf9009880c1ab5f12c47b673dd00bc43 (diff)
downloadjinx-20bc0c2243888900d2f04328e57ad2d7ca0a2403.tar.zst
jinx-20bc0c2243888900d2f04328e57ad2d7ca0a2403.zip
Basic AST for lang
Diffstat (limited to 'pkg/lang/ast/op.go')
-rw-r--r--pkg/lang/ast/op.go26
1 files changed, 26 insertions, 0 deletions
diff --git a/pkg/lang/ast/op.go b/pkg/lang/ast/op.go
new file mode 100644
index 0000000..a708c78
--- /dev/null
+++ b/pkg/lang/ast/op.go
@@ -0,0 +1,26 @@
+package ast
+
+type BinOp int
+
+const (
+	BinOpAdd BinOp = iota
+	BinOpSub
+	BinOpMul
+	BinOpDiv
+	BinOpMod
+
+	BinOpAssign
+	BinOpEq
+	BinOpNeq
+	BinOpLt
+	BinOpLte
+	BinOpGt
+	BinOpGte
+)
+
+type UnOp int
+
+const (
+	UnOpNot UnOp = iota
+	UnOpNeg
+)