MCPcopy
hub / github.com/expr-lang/expr / predicateNode

Method predicateNode

checker/checker.go:1212–1223  ·  view source on GitHub ↗
(node *ast.PredicateNode)

Source from the content-addressed store, hash-verified

1210}
1211
1212func (v *Checker) predicateNode(node *ast.PredicateNode) Nature {
1213 nt := v.visit(node.Node)
1214 var out []reflect.Type
1215 if nt.IsUnknown(&v.config.NtCache) {
1216 out = append(out, anyType)
1217 } else if !nt.Nil {
1218 out = append(out, nt.Type)
1219 }
1220 n := v.config.NtCache.FromType(reflect.FuncOf(anyTypeSlice, out, false))
1221 n.Ref = &nt
1222 return n
1223}
1224
1225func (v *Checker) pointerNode(node *ast.PointerNode) Nature {
1226 if len(v.predicateScopes) == 0 {

Callers 1

visitMethod · 0.95

Implementers 3

Configconf/config.go
Checkerchecker/checker.go
OperatorOverloadingpatcher/operator_override.go

Calls 3

visitMethod · 0.95
IsUnknownMethod · 0.80
FromTypeMethod · 0.80

Tested by

no test coverage detected