MCPcopy Create free account
hub / github.com/cel-expr/cel-go / Resolve

Method Resolve

interpreter/attribute_patterns.go:371–389  ·  view source on GitHub ↗

Resolve is an implementation of the NamespacedAttribute interface method which tests for matching unknown attribute patterns and returns types.Unknown if present. Otherwise, the standard Resolve logic applies.

(vars Activation)

Source from the content-addressed store, hash-verified

369// for matching unknown attribute patterns and returns types.Unknown if present. Otherwise,
370// the standard Resolve logic applies.
371func (m *attributeMatcher) Resolve(vars Activation) (any, error) {
372 id := m.NamespacedAttribute.ID()
373 // Bug in how partial activation is resolved, should search parents as well.
374 partial, isPartial := AsPartialActivation(vars)
375 if isPartial {
376 unk, err := m.fac.matchesUnknownPatterns(
377 partial,
378 id,
379 m.CandidateVariableNames(),
380 m.qualifiers)
381 if err != nil {
382 return nil, err
383 }
384 if unk != nil {
385 return unk, nil
386 }
387 }
388 return m.NamespacedAttribute.Resolve(vars)
389}
390
391// Qualify is an implementation of the Qualifier interface method.
392func (m *attributeMatcher) Qualify(vars Activation, obj any) (any, error) {

Callers

nothing calls this directly

Calls 5

AsPartialActivationFunction · 0.85
IDMethod · 0.65
ResolveMethod · 0.65

Tested by

no test coverage detected