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

Method FromExpr

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

Source from the content-addressed store, hash-verified

1353 return fe
1354}
1355func (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}
1370func (m *BinaryNode) Equal(n Node) bool {
1371 if m == nil && n == nil {
1372 return true

Callers

nothing calls this directly

Calls 3

TokenFromOpFunction · 0.92
NodesFromExprsFunction · 0.85
ErrorfMethod · 0.80

Tested by

no test coverage detected