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

Method Equal

expr/node.go:643–668  ·  view source on GitHub ↗
(n Node)

Source from the content-addressed store, hash-verified

641 return nil
642}
643func (m *FuncNode) Equal(n Node) bool {
644 if m == nil && n == nil {
645 return true
646 }
647 if m == nil && n != nil {
648 return false
649 }
650 if m != nil && n == nil {
651 return false
652 }
653 if nt, ok := n.(*FuncNode); ok {
654 if m.Name != nt.Name {
655 return false
656 }
657 if len(m.Args) != len(nt.Args) {
658 return false
659 }
660 for i, arg := range nt.Args {
661 if !arg.Equal(m.Args[i]) {
662 return false
663 }
664 }
665 return true
666 }
667 return false
668}
669
670// NewNumberStr is a little weird in that this Node accepts string @text
671// and uses go to parse into Int, AND Float.

Callers

nothing calls this directly

Calls 1

EqualMethod · 0.65

Tested by

no test coverage detected