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)
| 511 | // expr is *not* considered complex if it is not a call expression or has |
| 512 | // less than two arguments, or if it has a higher precedence than op. |
| 513 | func isComplexOperatorWithRespectTo(op string, expr ast.Expr) bool { |
| 514 | if expr.Kind() != ast.CallKind || len(expr.AsCall().Args()) < 2 { |
| 515 | return false |
| 516 | } |
| 517 | return isLowerPrecedence(op, expr) |
| 518 | } |
| 519 | |
| 520 | // Indicate whether this is a binary or ternary operator. |
| 521 | func isBinaryOrTernaryOperator(expr ast.Expr) bool { |
no test coverage detected