MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / CheckForMissingAttribute

Method CheckForMissingAttribute

eval/eval/attribute_utility.cc:75–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75bool AttributeUtility::CheckForMissingAttribute(
76 const AttributeTrail& trail) const {
77 if (trail.empty()) {
78 return false;
79 }
80 // Missing attributes are only treated as errors if the attribute exactly
81 // matches (so no guard against passing partial state to a function as with
82 // unknowns). This was initially a design oversight, but is difficult to
83 // change now.
84 return matcher_->CheckForMissing(trail.attribute()) ==
85 AttributeMatcher::MatchResult::FULL;
86}
87
88// Checks whether particular corresponds to any patterns that define unknowns.
89bool AttributeUtility::CheckForUnknown(const AttributeTrail& trail,

Callers 5

EvaluateMethod · 0.80
TEST_FFunction · 0.80
LookupIdentFunction · 0.80
CheckForMarkedAttributesFunction · 0.80
CheckForMarkedAttributesFunction · 0.80

Calls 3

attributeMethod · 0.80
emptyMethod · 0.45
CheckForMissingMethod · 0.45

Tested by 1

TEST_FFunction · 0.64