operator + method
Implementation
@override
ASTValue operator +(ASTValue other) {
if (other is ASTValueInt) {
return ASTValueDouble(value + other.value);
} else if (other is ASTValueDouble) {
return ASTValueDouble(value + other.value);
} else if (other is ASTValueString) {
return ASTValueString('$value${other.value}');
} else {
throw UnsupportedValueOperationError(
"Can't do '+' operation with: $other");
}
}