toBool method

bool toBool()

Implementation

bool toBool() {
  if (this == currentContext.trueExpr) {
    return true;
  } else if (this == currentContext.falseExpr) {
    return false;
  } else {
    throw ArgumentError('cant be converted to bool: $this');
  }
}