ladybird/Userland/Libraries/LibJS/Bytecode/CodeGenerationError.h
Linus Groh 57dc179b1f Everywhere: Rename to_{string => deprecated_string}() where applicable
This will make it easier to support both string types at the same time
while we convert code, and tracking down remaining uses.

One big exception is Value::to_string() in LibJS, where the name is
dictated by the ToString AO.
2022-12-06 08:54:33 +01:00

25 lines
475 B
C++

/*
* Copyright (c) 2022, Ali Mohammad Pur <mpfard@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Error.h>
#include <AK/StringView.h>
#include <LibJS/Forward.h>
namespace JS::Bytecode {
struct CodeGenerationError {
ASTNode const* failing_node { nullptr };
StringView reason_literal;
DeprecatedString to_deprecated_string();
};
template<typename T>
using CodeGenerationErrorOr = ErrorOr<T, CodeGenerationError>;
}