toInt method

int toInt()

Convert this expression to an int, requires that this expression is a Numeral.

Implementation

int toInt() {
  if (this is Numeral) {
    return (this as Numeral).toInt();
  } else {
    throw ArgumentError('cant be converted to int: $this');
  }
}