1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:57:45 +00:00

JSSpecCompiler: Parse arbitrarily large rational numbers in xspec mode

This commit is contained in:
Dan Klishch 2024-01-20 21:18:05 -05:00 committed by Andrew Kaster
parent 2a2e31f2ed
commit 86d54a8684
9 changed files with 64 additions and 8 deletions

View file

@ -10,6 +10,7 @@
#include <AK/RefCounted.h>
#include <AK/RefPtr.h>
#include <AK/Vector.h>
#include <LibCrypto/BigFraction/BigFraction.h>
#include "Forward.h"
@ -208,16 +209,16 @@ protected:
class MathematicalConstant : public Expression {
public:
MathematicalConstant(i64 number)
MathematicalConstant(Crypto::BigFraction number)
: m_number(number)
{
}
// TODO: This should be able to hold arbitrary number
i64 m_number;
protected:
void dump_tree(StringBuilder& builder) override;
private:
Crypto::BigFraction m_number;
};
class StringLiteral : public Expression {