evalLazy method
Implementation for this operator.
v1
- Operand 1.
v2
- Operand 2.
Returns the result of the operation.
Implementation
@override
LazyNumber evalLazy(final LazyNumber v1, final LazyNumber? v2) {
if (v2 != null) {
throw ExpressionException(
"Did not expect a second parameter for unary operator");
}
return LazyNumberImpl(eval: () {
return evalUnary(v1.eval());
}, getString: () {
return evalUnary(v1.eval()).toString();
});
}