(e *Expr)
| 1353 | return fe |
| 1354 | } |
| 1355 | func (m *BinaryNode) FromExpr(e *Expr) error { |
| 1356 | if e.Op == "" { |
| 1357 | return fmt.Errorf("unrecognized BinaryNode") |
| 1358 | } |
| 1359 | m.Operator = lex.TokenFromOp(e.Op) |
| 1360 | if len(e.Args) == 0 { |
| 1361 | return fmt.Errorf("Invalid BinaryNode, expected args %+v", e) |
| 1362 | } |
| 1363 | args, err := NodesFromExprs(e.Args) |
| 1364 | if err != nil { |
| 1365 | return err |
| 1366 | } |
| 1367 | m.Args = args |
| 1368 | return nil |
| 1369 | } |
| 1370 | func (m *BinaryNode) Equal(n Node) bool { |
| 1371 | if m == nil && n == nil { |
| 1372 | return true |
nothing calls this directly
no test coverage detected