mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +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:
parent
b5b08fba92
commit
4ced126704
Notes:
sideshowbarker
2024-07-19 06:33:31 +09:00
Author: https://github.com/mattco98
Commit: 4ced126704
Pull-request: https://github.com/SerenityOS/serenity/pull/2034
Reviewed-by: https://github.com/awesomekling
21 changed files with 819 additions and 3 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue