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

LibJS: Add BigInt

This commit is contained in:
Linus Groh 2020-06-06 01:14:10 +01:00 committed by Andreas Kling
parent 40829b849a
commit 0ff9d7e189
32 changed files with 1910 additions and 636 deletions

View file

@ -558,6 +558,22 @@ private:
double m_value { 0 };
};
class BigIntLiteral final : public Literal {
public:
explicit BigIntLiteral(String value)
: m_value(move(value))
{
}
virtual Value execute(Interpreter&) const override;
virtual void dump(int indent) const override;
private:
virtual const char* class_name() const override { return "BigIntLiteral"; }
String m_value;
};
class StringLiteral final : public Literal {
public:
explicit StringLiteral(String value)