diff --git a/Userland/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp b/Userland/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp index 1bd13277a4..eb6d0672a6 100644 --- a/Userland/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp +++ b/Userland/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp @@ -90,6 +90,7 @@ struct Parameter { String name; bool optional { false }; String optional_default_value {}; + HashMap extended_attributes; }; struct Function { @@ -267,13 +268,16 @@ static OwnPtr parse_interface(StringView filename, const StringView& for (;;) { if (lexer.next_is(')')) break; + HashMap extended_attributes; + if (lexer.consume_specific('[')) + extended_attributes = parse_extended_attributes(); bool optional = lexer.consume_specific("optional"); if (optional) consume_whitespace(); auto type = parse_type(); consume_whitespace(); auto name = lexer.consume_until([](auto ch) { return isspace(ch) || ch == ',' || ch == ')' || ch == '='; }); - Parameter parameter = { move(type), move(name), optional }; + Parameter parameter = { move(type), move(name), optional, {}, extended_attributes }; consume_whitespace(); if (lexer.next_is(')')) { parameters.append(parameter); @@ -708,8 +712,8 @@ static void generate_arguments(SourceGenerator& generator, const Vector