}
}
if (failMessage != null) {
sourceUnit.getErrorCollector().addError(
new SyntaxException(failMessage, statement.getLineNumber(), statement.getColumnNumber()),
sourceUnit
);
}
return returnStatement;
} else {
if (seenPluginsBlock) {
String message = String.format(
pluginBlockTransformer.formatErrorMessage("all %s {} blocks must appear before any %s {} blocks in the script"),
classpathBlockName, PLUGINS
);
sourceUnit.getErrorCollector().addError(
new SyntaxException(message, statement.getLineNumber(), statement.getColumnNumber()),
sourceUnit
);
}
return statement; // don't transform classpathBlockName
}