1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:17:44 +00:00

LibJS: Use String::formatted() for parser error messages

This commit is contained in:
Linus Groh 2020-10-04 14:53:15 +01:00 committed by Andreas Kling
parent f9eaac62d9
commit bc701658f8
2 changed files with 8 additions and 8 deletions

View file

@ -94,7 +94,7 @@ public:
{
if (line == 0 || column == 0)
return message;
return String::format("%s (line: %zu, column: %zu)", message.characters(), line, column);
return String::formatted("{} (line: {}, column: {})", message, line, column);
}
String source_location_hint(const StringView& source, const char spacer = ' ', const char indicator = '^') const