Indicate whether this is a binary or ternary operator.
(expr *exprpb.Expr)
| 780 | |
| 781 | // Indicate whether this is a binary or ternary operator. |
| 782 | func isBinaryOrTernaryOperator(expr *exprpb.Expr) bool { |
| 783 | if expr.GetCallExpr() == nil || len(expr.GetCallExpr().GetArgs()) < 2 { |
| 784 | return false |
| 785 | } |
| 786 | _, isBinaryOp := operators.FindReverseBinaryOperator(expr.GetCallExpr().GetFunction()) |
| 787 | return isBinaryOp || isSamePrecedence(operators.Conditional, expr) |
| 788 | } |
| 789 | |
| 790 | func isNullLiteral(node *exprpb.Expr) bool { |
| 791 | _, isConst := node.ExprKind.(*exprpb.Expr_ConstExpr) |
no test coverage detected