mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibWeb/Bindings: Add a forward declaration of generate_to_cpp
generate_to_cpp is called recursively, such as when generating dictionary values. To support factoring this (massive) function into functions, add a forward declaration.
This commit is contained in:
committed by
Jelle Raaijmakers
parent
92f4fc2cb9
commit
f04e7d88d5
Notes:
github-actions[bot]
2026-03-19 21:15:53 +00:00
Author: https://github.com/shannonbooth Commit: https://github.com/LadybirdBrowser/ladybird/commit/f04e7d88d5a Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8512 Reviewed-by: https://github.com/gmta ✅
@@ -24,6 +24,9 @@ namespace IDL {
|
||||
|
||||
Vector<StringView> g_header_search_paths;
|
||||
|
||||
template<typename ParameterType>
|
||||
static void generate_to_cpp(SourceGenerator& generator, ParameterType& parameter, ByteString const& js_name, ByteString const& js_suffix, ByteString const& cpp_name, IDL::Interface const& interface, bool legacy_null_to_empty_string = false, bool optional = false, Optional<ByteString> optional_default_value = {}, bool variadic = false, size_t recursion_depth = 0);
|
||||
|
||||
// FIXME: Generate this automatically somehow.
|
||||
static bool is_platform_object(Type const& type)
|
||||
{
|
||||
@@ -661,7 +664,7 @@ static void generate_to_integral(SourceGenerator& scoped_generator, ParameterTyp
|
||||
}
|
||||
|
||||
template<typename ParameterType>
|
||||
static void generate_to_cpp(SourceGenerator& generator, ParameterType& parameter, ByteString const& js_name, ByteString const& js_suffix, ByteString const& cpp_name, IDL::Interface const& interface, bool legacy_null_to_empty_string = false, bool optional = false, Optional<ByteString> optional_default_value = {}, bool variadic = false, size_t recursion_depth = 0)
|
||||
static void generate_to_cpp(SourceGenerator& generator, ParameterType& parameter, ByteString const& js_name, ByteString const& js_suffix, ByteString const& cpp_name, IDL::Interface const& interface, bool legacy_null_to_empty_string, bool optional, Optional<ByteString> optional_default_value, bool variadic, size_t recursion_depth)
|
||||
{
|
||||
auto scoped_generator = generator.fork();
|
||||
auto acceptable_cpp_name = make_input_acceptable_cpp(cpp_name);
|
||||
|
||||
Reference in New Issue
Block a user