GetBinaryFunction returns the binary function that matches the given operator.
(operator Operator)
| 136 | |
| 137 | // GetBinaryFunction returns the binary function that matches the given operator. |
| 138 | func GetBinaryFunction(operator Operator) IntermediateFunction { |
| 139 | // Returns nil if not found, which is fine as IntermediateFunction will handle the nil deducer |
| 140 | return IntermediateFunction{ |
| 141 | Functions: binaryOperatorOverloads[operator], |
| 142 | AllOverloads: binaryOperatorPermutations[operator], |
| 143 | IsOperator: true, |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | // String returns the string form of the operator. |
| 148 | func (o Operator) String() string { |
no outgoing calls
no test coverage detected