isLowerPrecedence indicates whether the precedence of the input operator is lower precedence than the (possible) operation represented in the input Expr. If the expr is not a Call, the result is false.
(op string, expr *exprpb.Expr)
| 751 | // |
| 752 | // If the expr is not a Call, the result is false. |
| 753 | func isLowerPrecedence(op string, expr *exprpb.Expr) bool { |
| 754 | if expr.GetCallExpr() == nil { |
| 755 | return false |
| 756 | } |
| 757 | c := expr.GetCallExpr() |
| 758 | other := c.GetFunction() |
| 759 | return operators.Precedence(op) < operators.Precedence(other) |
| 760 | } |
| 761 | |
| 762 | // Indicates whether the expr is a complex operator, i.e., a call expression |
| 763 | // with 2 or more arguments. |
no outgoing calls
no test coverage detected