switch (kind) {
// boolean
case LT:
case LTX:
return new Boolean(lhs < rhs);
case GT:
case GTX:
return new Boolean(lhs > rhs);
case EQ:
return new Boolean(lhs == rhs);
case LE:
case LEX:
return new Boolean(lhs <= rhs);
case GE:
case GEX:
return new Boolean(lhs >= rhs);
case NE:
return new Boolean(lhs != rhs);
// arithmetic
case PLUS:
return new [[#variablec2549c0]](lhs + rhs);
case MINUS:
return new [[#variablec2549c0]](lhs - rhs);
case STAR:
return new [[#variablec2549c0]](lhs * rhs);
case SLASH:
return new [[#variablec2549c0]](lhs / rhs);
case MOD:
return new [[#variablec2549c0]](lhs % rhs);
// bitwise
case LSHIFT:
case LSHIFTX:
return new [[#variablec2549c0]](lhs << rhs);
case RSIGNEDSHIFT:
case RSIGNEDSHIFTX:
return new [[#variablec2549c0]](lhs >> rhs);
case RUNSIGNEDSHIFT:
case RUNSIGNEDSHIFTX:
return new [[#variablec2549c0]](lhs >>> rhs);
case BIT_AND:
case BIT_ANDX:
return new [[#variablec2549c0]](lhs&rhs);
case BIT_OR:
case BIT_ORX:
return new [[#variablec2549c0]](lhs|rhs);
case XOR:
return new [[#variablec2549c0]](lhs^rhs);
default:
throw new InterpreterError( [[#variablec254920]]);
}
|