assert kind != null;
AstAttributeElement element = elements.remove(elementName);
if (element == null) {
return null;
} else if ((element.value instanceof AstLiteral) == false) {
environment.report(new Diagnostic(
Level.ERROR,
element,
Messages.getString("CsvSupportDriver.diagnosticInvalidLiteralKind"), //$NON-NLS-1$
TARGET_NAME,
elementName,
kind));
return null;
} else {
AstLiteral literal = (AstLiteral) element.value;
if (literal.kind != kind) {
environment.report(new Diagnostic(
Level.ERROR,
element,
Messages.getString("CsvSupportDriver.diagnosticInvalidLiteralKind"), //$NON-NLS-1$
TARGET_NAME,
elementName,