mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-05 15:49:15 +00:00
This reverts commit c14173f651
. We
should only annotate the minimum number of symbols that external
consumers actually use, so I am starting from scratch to do that
26 lines
492 B
C++
26 lines
492 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/String.h>
|
|
#include <AK/StringView.h>
|
|
#include <LibJS/Forward.h>
|
|
|
|
namespace JS::Bytecode {
|
|
|
|
struct CodeGenerationError {
|
|
ASTNode const* failing_node { nullptr };
|
|
StringView reason_literal;
|
|
|
|
ErrorOr<String> to_string() const;
|
|
};
|
|
|
|
template<typename T>
|
|
using CodeGenerationErrorOr = ErrorOr<T, CodeGenerationError>;
|
|
|
|
}
|