public static void checkComparison(final String operator,
final SelectorAST left,
final SelectorAST right)
throws TypeMismatchException {
Type lhs = left.getReturnType();
Type rhs = right.getReturnType();
if (lhs == Type.UNDEFINED || rhs == Type.UNDEFINED) {
// can't evaluate this at parse time.
} else if (lhs == Type.STRING && rhs == Type.STRING) {
checkStringComparison(operator, left, right);