mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-25 11:48:06 +00:00
IDLGenerators: Unbreak sequence<dictionary> codegen
This was completely busted (where it would generate a variable inside a block, and try to access it outside the block); this commit fixes this in the least annoying way possible.
This commit is contained in:
parent
51bab5b186
commit
3a6b6a732e
Notes:
github-actions[bot]
2025-04-22 14:45:19 +00:00
Author: https://github.com/alimpfard
Commit: 3a6b6a732e
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4423
Reviewed-by: https://github.com/ADKaster ✅
1 changed files with 2 additions and 1 deletions
|
@ -1859,7 +1859,8 @@ static void generate_wrap_statement(SourceGenerator& generator, ByteString const
|
||||||
auto* wrapped_element@recursion_depth@ = &(*element@recursion_depth@);
|
auto* wrapped_element@recursion_depth@ = &(*element@recursion_depth@);
|
||||||
)~~~");
|
)~~~");
|
||||||
} else {
|
} else {
|
||||||
generate_wrap_statement(scoped_generator, ByteString::formatted("element{}", recursion_depth), sequence_generic_type.parameters().first(), interface, ByteString::formatted("auto wrapped_element{} =", recursion_depth), WrappingReference::Yes, recursion_depth + 1);
|
scoped_generator.append("JS::Value wrapped_element@recursion_depth@;\n"sv);
|
||||||
|
generate_wrap_statement(scoped_generator, ByteString::formatted("element{}", recursion_depth), sequence_generic_type.parameters().first(), interface, ByteString::formatted("wrapped_element{} =", recursion_depth), WrappingReference::Yes, recursion_depth + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
scoped_generator.append(R"~~~(
|
scoped_generator.append(R"~~~(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue