(e *Expr)
| 1628 | return fe |
| 1629 | } |
| 1630 | func (m *TriNode) FromExpr(e *Expr) error { |
| 1631 | if e.Op == "" { |
| 1632 | return fmt.Errorf("unrecognized TriNode no op") |
| 1633 | } |
| 1634 | m.Operator = lex.TokenFromOp(e.Op) |
| 1635 | if len(e.Args) == 0 { |
| 1636 | return fmt.Errorf("Invalid TriNode, expected args %+v", e) |
| 1637 | } |
| 1638 | if m.Operator.T == lex.TokenNil { |
| 1639 | return fmt.Errorf("Unrecognized op %v", e.Op) |
| 1640 | } |
| 1641 | args, err := NodesFromExprs(e.Args) |
| 1642 | if err != nil { |
| 1643 | return err |
| 1644 | } |
| 1645 | m.Args = args |
| 1646 | return nil |
| 1647 | } |
| 1648 | func (m *TriNode) Equal(n Node) bool { |
| 1649 | if m == nil && n == nil { |
| 1650 | return true |
nothing calls this directly
no test coverage detected