Indicates whether it is a complex operation compared to another. expr is *not* considered complex if it is not a call expression or has less than two arguments, or if it has a higher precedence than op.
(op string, expr *exprpb.Expr)
| 772 | // expr is *not* considered complex if it is not a call expression or has |
| 773 | // less than two arguments, or if it has a higher precedence than op. |
| 774 | func isComplexOperatorWithRespectTo(op string, expr *exprpb.Expr) bool { |
| 775 | if expr.GetCallExpr() == nil || len(expr.GetCallExpr().GetArgs()) < 2 { |
| 776 | return false |
| 777 | } |
| 778 | return isLowerPrecedence(op, expr) |
| 779 | } |
| 780 | |
| 781 | // Indicate whether this is a binary or ternary operator. |
| 782 | func isBinaryOrTernaryOperator(expr *exprpb.Expr) bool { |
no test coverage detected