AstAttribute attribute) {
assert environment != null;
assert declaration != null;
assert attribute != null;
Map<String, AstAttributeElement> elements = AttributeUtil.getElementMap(attribute);
AstAttributeElement nameElement = elements.remove(ELEMENT_NAME);
environment.reportAll(AttributeUtil.reportInvalidElements(attribute, elements.values()));
if (nameElement == null) {
environment.report(new Diagnostic(
Level.ERROR,
attribute.name,