mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
JSSpecCompiler: Parse arbitrarily large rational numbers in xspec mode
This commit is contained in:
committed by
Andrew Kaster
parent
2a2e31f2ed
commit
86d54a8684
@@ -126,7 +126,8 @@ template<>
|
||||
NullableTree CppASTConverter::convert_node(Cpp::NumericLiteral const& literal)
|
||||
{
|
||||
// TODO: Numerical literals are not limited to i64.
|
||||
return make_ref_counted<MathematicalConstant>(literal.value().to_number<i64>().value());
|
||||
VERIFY(literal.value().to_number<i64>().has_value());
|
||||
return make_ref_counted<MathematicalConstant>(MUST(Crypto::BigFraction::from_string(literal.value())));
|
||||
}
|
||||
|
||||
template<>
|
||||
|
||||
Reference in New Issue
Block a user