FindReverseBinaryOperator returns the unmangled, text representation of a binary operator. If the symbol does refer to an operator, but the operator does not have a display name the result is false.
(symbol string)
| 126 | // If the symbol does refer to an operator, but the operator does not have a display name the |
| 127 | // result is false. |
| 128 | func FindReverseBinaryOperator(symbol string) (string, bool) { |
| 129 | op, found := operatorMap[symbol] |
| 130 | if !found || op.arity != 2 { |
| 131 | return "", false |
| 132 | } |
| 133 | if op.displayName == "" { |
| 134 | return "", false |
| 135 | } |
| 136 | return op.displayName, true |
| 137 | } |
| 138 | |
| 139 | // Precedence returns the operator precedence, where the higher the number indicates |
| 140 | // higher precedence operations. |
no outgoing calls
no test coverage detected