mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 00:25:12 +00:00
LibJS: Move Value::as_accessor() to Value.h
This commit is contained in:
committed by
Andreas Kling
parent
5a983c238b
commit
5b88aa8e96
@@ -201,10 +201,13 @@ public:
|
||||
return m_value.as_cell;
|
||||
}
|
||||
|
||||
String to_string_without_side_effects() const;
|
||||
Accessor& as_accessor()
|
||||
{
|
||||
ASSERT(is_accessor());
|
||||
return *m_value.as_accessor;
|
||||
}
|
||||
|
||||
Function& as_function();
|
||||
Accessor& as_accessor();
|
||||
|
||||
i32 as_i32() const;
|
||||
size_t as_size_t() const;
|
||||
@@ -219,6 +222,8 @@ public:
|
||||
size_t to_size_t(Interpreter&) const;
|
||||
bool to_boolean() const;
|
||||
|
||||
String to_string_without_side_effects() const;
|
||||
|
||||
Value value_or(Value fallback) const
|
||||
{
|
||||
if (is_empty())
|
||||
|
||||
Reference in New Issue
Block a user