mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:08:12 +00:00
JSSpecCompiler: Parse arbitrarily large rational numbers in xspec mode
This commit is contained in:
parent
2a2e31f2ed
commit
86d54a8684
9 changed files with 64 additions and 8 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue