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

Method Resolve

interpreter/attribute_patterns.go:368–386  ·  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

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