toBigInt method
Implementation
@override
BigInt toBigInt() {
if (value.isNaN || value.isInfinite) {
throw XPathEvaluationException(
XPathErrorCode.FOCA0002,
'Cannot convert $value to xs:integer',
);
}
if (value.abs() > 9223372036854775807.0) {
throw XPathEvaluationException(
XPathErrorCode.FOCA0003,
'Float value too large for integer: $value',
);
}
return BigInt.from(value.toInt());
}