mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:47:36 +00:00
LibJS: Remove UndefinedLiteral, add undefined to global object
There is no such thing as a "undefined literal" in JS - undefined is just a property on the global object with a value of undefined. This is pretty similar to NaN. var undefined = "foo"; is a perfectly fine AssignmentExpression :^)
This commit is contained in:
parent
543c6e00db
commit
2636cac6e4
6 changed files with 1 additions and 30 deletions
|
@ -440,19 +440,6 @@ private:
|
|||
virtual const char* class_name() const override { return "NullLiteral"; }
|
||||
};
|
||||
|
||||
class UndefinedLiteral final : public Literal {
|
||||
public:
|
||||
explicit UndefinedLiteral()
|
||||
{
|
||||
}
|
||||
|
||||
virtual Value execute(Interpreter&) const override;
|
||||
virtual void dump(int indent) const override;
|
||||
|
||||
private:
|
||||
virtual const char* class_name() const override { return "UndefinedLiteral"; }
|
||||
};
|
||||
|
||||
class Identifier final : public Expression {
|
||||
public:
|
||||
explicit Identifier(const FlyString& string)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue