mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-08 17:47:18 +00:00
JSSpecCompiler: Parse arbitrarily large rational numbers in xspec mode
This commit is contained in:
committed by
Andrew Kaster
parent
2a2e31f2ed
commit
86d54a8684
@@ -299,7 +299,7 @@ TextParseErrorOr<Tree> TextParser::parse_expression()
|
||||
if (token.type == TokenType::Identifier) {
|
||||
expression = make_ref_counted<UnresolvedReference>(token.data);
|
||||
} else if (token.type == TokenType::Number) {
|
||||
expression = make_ref_counted<MathematicalConstant>(token.data.to_number<i64>().value());
|
||||
expression = make_ref_counted<MathematicalConstant>(MUST(Crypto::BigFraction::from_string(token.data)));
|
||||
} else if (token.type == TokenType::String) {
|
||||
expression = make_ref_counted<StringLiteral>(token.data);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user