()
| 1343 | } |
| 1344 | } |
| 1345 | func (m *BinaryNode) Expr() *Expr { |
| 1346 | fe := &Expr{Op: strings.ToLower(m.Operator.V)} |
| 1347 | if len(m.Args) > 0 { |
| 1348 | fe.Args = ExprsFromNodes(m.Args) |
| 1349 | } |
| 1350 | if m.negated { |
| 1351 | return &Expr{Op: "not", Args: []*Expr{fe}} |
| 1352 | } |
| 1353 | return fe |
| 1354 | } |
| 1355 | func (m *BinaryNode) FromExpr(e *Expr) error { |
| 1356 | if e.Op == "" { |
| 1357 | return fmt.Errorf("unrecognized BinaryNode") |
nothing calls this directly
no test coverage detected