}
private void checkDateTimeComparison(DateTimeResult that) {
if (that.getValue().isDate()) {
if (this.getValue().isTime()) {
throw new InvalidDateTimeComparison("date","time",ctx.getCurrentAST());
} else if (this.getValue().isDateTime()) {
throw new InvalidDateTimeComparison("date","datetime",ctx.getCurrentAST());
}
} else if (that.getValue().isTime()) {
if (this.getValue().isDate()) {
throw new InvalidDateTimeComparison("time","date",ctx.getCurrentAST());
} else if (this.getValue().isDateTime()) {
throw new InvalidDateTimeComparison("time","datetime",ctx.getCurrentAST());
}
} else {
if (this.getValue().isDate()) {
throw new InvalidDateTimeComparison("datetime","date",ctx.getCurrentAST());
} else if (this.getValue().isTime()) {
throw new InvalidDateTimeComparison("datetime","time",ctx.getCurrentAST());
}
}
}