simplify method
Possible simplifications:
- a % -b = a % b
- 0 % a = 0
Implementation
@override
Expression simplify() {
final Expression firstOp = first.simplify();
Expression secondOp = second.simplify();
if (_isNumber(firstOp, 0)) {
return firstOp; // = 0
}
if (secondOp is UnaryMinus) {
secondOp = (secondOp).exp;
}
return Modulo(firstOp, secondOp);
}