for (BnfAttr attr : attrs.getAttrList()) {
BnfAttrPattern pattern = attr.getAttrPattern();
if (pattern == null) continue;
BnfStringLiteralExpression patternExpression = pattern.getLiteralExpression();
PsiReference ref = BnfStringImpl.matchesElement(patternExpression, target) ? patternExpression.getReference() : null;
if (ref != null && ref.isReferenceTo(target)) {
if (!consumer.process(ref)) return;
}
}
}
}