mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-05 01:55:21 +03:00
Meta: Fix IDL binding generation for dictionary members
- Previously was generating bad syntax and missed a snakecase conversion
This commit is contained in:
parent
fc7de74b12
commit
30e67721ae
Notes:
sideshowbarker
2024-07-17 18:08:55 +09:00
Author: https://github.com/msub2 Commit: https://github.com/SerenityOS/serenity/commit/30e67721ae Pull-request: https://github.com/SerenityOS/serenity/pull/19643 Reviewed-by: https://github.com/awesomekling
@ -1804,9 +1804,9 @@ static void generate_wrap_statement(SourceGenerator& generator, DeprecatedString
|
||||
auto member_value_js_name = DeprecatedString::formatted("{}_value", member_key_js_name);
|
||||
dictionary_generator.set("member_value", member_value_js_name);
|
||||
|
||||
auto wrapped_value_name = DeprecatedString::formatted("auto wrapped_{}", member_value_js_name);
|
||||
auto wrapped_value_name = DeprecatedString::formatted("wrapped_{}", member_value_js_name);
|
||||
dictionary_generator.set("wrapped_value_name", wrapped_value_name);
|
||||
generate_wrap_statement(dictionary_generator, DeprecatedString::formatted("{}.{}", value, member.name), member.type, interface, wrapped_value_name, WrappingReference::No, recursion_depth + 1);
|
||||
generate_wrap_statement(dictionary_generator, DeprecatedString::formatted("{}.{}", value, member.name.to_snakecase()), member.type, interface, DeprecatedString::formatted("auto {} =", wrapped_value_name), WrappingReference::No, recursion_depth + 1);
|
||||
|
||||
dictionary_generator.append(R"~~~(
|
||||
MUST(dictionary_object@recursion_depth@->create_data_property("@member_key@", @wrapped_value_name@));
|
||||
|
Loading…
Reference in New Issue
Block a user