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

LibJS: Add symbol objects

This commit adds the following classes: SymbolObject, SymbolConstructor,
SymbolPrototype, and Symbol. This commit does not introduce any
new functionality to the Object class, so they cannot be used as
property keys in objects.
This commit is contained in:
mattco98 2020-04-29 23:25:21 -07:00 committed by Andreas Kling
parent b5b08fba92
commit 4ced126704
21 changed files with 819 additions and 3 deletions

View file

@ -491,6 +491,8 @@ Value UnaryExpression::execute(Interpreter& interpreter) const
return js_string(interpreter, "object");
case Value::Type::Boolean:
return js_string(interpreter, "boolean");
case Value::Type::Symbol:
return js_string(interpreter, "symbol");
default:
ASSERT_NOT_REACHED();
}