mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 23:25:20 +00:00
LibJS: Support numeric literal expressions in nullish object exceptions
This commit is contained in:
committed by
Andreas Kling
parent
2d603c7c3f
commit
bfcfe6ce35
@@ -453,6 +453,11 @@ static Optional<ByteString> expression_identifier(Expression const& expression)
|
||||
return identifier.string();
|
||||
}
|
||||
|
||||
if (expression.is_numeric_literal()) {
|
||||
auto const& literal = static_cast<NumericLiteral const&>(expression);
|
||||
return literal.value().to_string_without_side_effects().to_byte_string();
|
||||
}
|
||||
|
||||
if (expression.is_member_expression()) {
|
||||
auto const& member_expression = static_cast<MemberExpression const&>(expression);
|
||||
StringBuilder builder;
|
||||
|
||||
Reference in New Issue
Block a user