operator / method

  1. @override
ASTValueDouble operator /(
  1. ASTValue other
)
override

Implementation

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