Use an enum to represent operators to avoid string comparison.