MCPcopy Create free account
hub / github.com/araddon/qlbridge / FromExpr

Method FromExpr

expr/node.go:1503–1517  ·  view source on GitHub ↗
(e *Expr)

Source from the content-addressed store, hash-verified

1501 return fe
1502}
1503func (m *BooleanNode) FromExpr(e *Expr) error {
1504 if e.Op == "" {
1505 return fmt.Errorf("unrecognized BooleanNode op")
1506 }
1507 m.Operator = lex.TokenFromOp(e.Op)
1508 if len(e.Args) == 0 {
1509 return fmt.Errorf("Invalid BooleanNode, expected args %+v", e)
1510 }
1511 args, err := NodesFromExprs(e.Args)
1512 if err != nil {
1513 return err
1514 }
1515 m.Args = args
1516 return nil
1517}
1518func (m *BooleanNode) Equal(n Node) bool {
1519 if m == nil && n == nil {
1520 return true

Callers

nothing calls this directly

Calls 3

TokenFromOpFunction · 0.92
NodesFromExprsFunction · 0.85
ErrorfMethod · 0.80

Tested by

no test coverage detected