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 ast.Expr)
| 493 | // |
| 494 | // If the expr is not a Call, the result is false. |
| 495 | func isLowerPrecedence(op string, expr ast.Expr) bool { |
| 496 | c := expr.AsCall() |
| 497 | other := c.FunctionName() |
| 498 | return operators.Precedence(op) < operators.Precedence(other) |
| 499 | } |
| 500 | |
| 501 | // Indicates whether the expr is a complex operator, i.e., a call expression |
| 502 | // with 2 or more arguments. |
no test coverage detected