()
| 1201 | func (*BinaryExpr) operatorExpr() {} |
| 1202 | |
| 1203 | func (node *BinaryExpr) memoizeFn() { |
| 1204 | leftRet, rightRet := node.Left.(TypedExpr).ResolvedType(), node.Right.(TypedExpr).ResolvedType() |
| 1205 | fn, ok := BinOps[node.Operator].lookupImpl(leftRet, rightRet) |
| 1206 | if !ok { |
| 1207 | panic(errors.AssertionFailedf("lookup for BinaryExpr %s's BinOp failed", |
| 1208 | AsStringWithFlags(node, FmtShowTypes))) |
| 1209 | } |
| 1210 | node.Fn = fn |
| 1211 | } |
| 1212 | |
| 1213 | // Format implements the NodeFormatter interface. |
| 1214 | func (node *BinaryExpr) Format(ctx *FmtCtx) { |
no test coverage detected