diff --git a/operator-binary.go b/operator-binary.go index 13d2307..cfdc3a8 100644 --- a/operator-binary.go +++ b/operator-binary.go @@ -11,7 +11,7 @@ func newBinNotTerm(tk *Token) (inst *term) { tk: *tk, children: make([]*term, 0, 1), position: posPrefix, - priority: priNot, + priority: priBinary, evalFunc: evalBinaryNot, } } @@ -39,7 +39,7 @@ func newBinAndTerm(tk *Token) (inst *term) { tk: *tk, children: make([]*term, 0, 2), position: posInfix, - priority: priAnd, + priority: priBinary, evalFunc: evalBinaryAnd, } } @@ -71,7 +71,7 @@ func newBinOrTerm(tk *Token) (inst *term) { tk: *tk, children: make([]*term, 0, 2), position: posInfix, - priority: priOr, + priority: priBinary, evalFunc: evalBinaryOr, } } diff --git a/term.go b/term.go index 457e1c2..11e887f 100644 --- a/term.go +++ b/term.go @@ -19,6 +19,7 @@ const ( priAnd priNot priRelational + priBinary priSum priProduct priFraction