From 20bc0c2243888900d2f04328e57ad2d7ca0a2403 Mon Sep 17 00:00:00 2001 From: Mel Date: Wed, 20 Apr 2022 02:48:45 +0200 Subject: Basic AST for lang --- pkg/lang/ast/op.go | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 pkg/lang/ast/op.go (limited to 'pkg/lang/ast/op.go') 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 +) -- cgit 1.4.1