public Object visit(ASTLimitOffset node, Object data) {
int child = 0;
if (node.hasOffset) {
Node offsetNode = node.jjtGetChild(child++);
if (offsetNode instanceof ASTParameter) {
ASTParameter param = (ASTParameter) offsetNode;
Class parameterType = getParameterType(param.number);
if (int.class != parameterType && Integer.class != parameterType) {
throw CmpMessages.MESSAGES.offsetParameterMustBeInt();
}
offsetParam = param.number;
} else {
ASTExactNumericLiteral param = (ASTExactNumericLiteral) offsetNode;
offsetValue = (int) param.value;
}
}
if (node.hasLimit) {
Node limitNode = node.jjtGetChild(child);
if (limitNode instanceof ASTParameter) {
ASTParameter param = (ASTParameter) limitNode;
Class parameterType = getParameterType(param.number);
if (int.class != parameterType && Integer.class != parameterType) {
throw CmpMessages.MESSAGES.limitParameterMustBeInt();
}
limitParam = param.number;