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 ast.Expr)
| 573 | // expr is *not* considered complex if it is not a call expression or has |
| 574 | // less than two arguments, or if it has a higher precedence than op. |
| 575 | func isComplexOperatorWithRespectTo(op string, expr ast.Expr) bool { |
| 576 | if expr.Kind() != ast.CallKind || len(expr.AsCall().Args()) < 2 { |
| 577 | return false |
| 578 | } |
| 579 | return isLowerPrecedence(op, expr) |
| 580 | } |
| 581 | |
| 582 | // Indicate whether this is a binary or ternary operator. |
| 583 | func isBinaryOrTernaryOperator(expr ast.Expr) bool { |
no test coverage detected