mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:07:46 +00:00
LibJS: Use String::formatted() in various other places
This commit is contained in:
parent
2e2571743b
commit
123f98201e
7 changed files with 23 additions and 22 deletions
|
@ -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()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue