mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 16:25:06 +00:00
LibJS: Add to_string definitions to CodeGenerationError and ParserError
This commit is contained in:
parent
f7458b3e17
commit
93ad25fbe5
5 changed files with 30 additions and 0 deletions
17
Userland/Libraries/LibJS/Bytecode/CodeGenerationError.cpp
Normal file
17
Userland/Libraries/LibJS/Bytecode/CodeGenerationError.cpp
Normal file
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibJS/AST.h>
|
||||
#include <LibJS/Bytecode/CodeGenerationError.h>
|
||||
|
||||
namespace JS::Bytecode {
|
||||
|
||||
ErrorOr<String> CodeGenerationError::to_string() const
|
||||
{
|
||||
return String::formatted("CodeGenerationError in {}: {}", failing_node ? failing_node->class_name() : "<unknown node>", reason_literal);
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue