mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibJS: Use String::formatted() in various other places
This commit is contained in:
committed by
Andreas Kling
parent
2e2571743b
commit
123f98201e
@@ -80,7 +80,7 @@ Value FunctionConstructor::construct(Function&)
|
||||
if (vm.exception())
|
||||
return {};
|
||||
}
|
||||
auto source = String::format("function anonymous(%s) { %s }", parameters_source.characters(), body_source.characters());
|
||||
auto source = String::formatted("function anonymous({}) {{ {} }}", parameters_source, body_source);
|
||||
auto parser = Parser(Lexer(source));
|
||||
auto function_expression = parser.parse_function_node<FunctionExpression>();
|
||||
if (parser.has_errors()) {
|
||||
|
||||
Reference in New Issue
Block a user