mirror of
https://github.com/hanzoai/expr.git
synced 2026-09-24 16:58:58 +00:00
Improve ast printing for boolean operators
This commit is contained in:
@@ -16,6 +16,10 @@ func Less(a, b string) bool {
|
||||
return Binary[a].Precedence < Binary[b].Precedence
|
||||
}
|
||||
|
||||
func IsBoolean(op string) bool {
|
||||
return op == "and" || op == "or" || op == "&&" || op == "||"
|
||||
}
|
||||
|
||||
var Unary = map[string]Operator{
|
||||
"not": {50, Left},
|
||||
"!": {50, Left},
|
||||
|
||||
Reference in New Issue
Block a user