mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-01 13:49:05 +00:00
LibJS: Add support for constructing a PropertyKey from a FlyString
This commit is contained in:
parent
8fa0730b84
commit
713d8dc0f8
Notes:
sideshowbarker
2024-07-17 06:35:16 +09:00
Author: https://github.com/shannonbooth
Commit: 713d8dc0f8
Pull-request: https://github.com/SerenityOS/serenity/pull/23788
1 changed files with 7 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/DeprecatedFlyString.h>
|
||||
#include <AK/FlyString.h>
|
||||
#include <LibJS/Heap/Handle.h>
|
||||
#include <LibJS/Runtime/Completion.h>
|
||||
#include <LibJS/Runtime/StringOrSymbol.h>
|
||||
|
@ -71,6 +72,12 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
PropertyKey(FlyString const& string)
|
||||
: m_type(Type::String)
|
||||
, m_string(string.to_deprecated_fly_string())
|
||||
{
|
||||
}
|
||||
|
||||
PropertyKey(DeprecatedFlyString string, StringMayBeNumber string_may_be_number = StringMayBeNumber::Yes)
|
||||
: m_string_may_be_number(string_may_be_number == StringMayBeNumber::Yes)
|
||||
, m_type(Type::String)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue