| 73 | } |
| 74 | |
| 75 | bool 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. |
| 89 | bool AttributeUtility::CheckForUnknown(const AttributeTrail& trail, |