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)
| 531 | // |
| 532 | // If the expr is not a Call, the result is false. |
| 533 | func isLowerPrecedence(op string, expr ast.Expr) bool { |
| 534 | c := expr.AsCall() |
| 535 | other := c.FunctionName() |
| 536 | return operators.Precedence(op) < operators.Precedence(other) |
| 537 | } |
| 538 | |
| 539 | // Indicates whether the expr is a complex operator, i.e., a call expression |
| 540 | // with 2 or more arguments. |
no test coverage detected