From e534395243e92a155c8eda0885a532dd9d2c6fd0 Mon Sep 17 00:00:00 2001 From: ahl-trifork Date: Tue, 5 Aug 2025 19:38:55 +0200 Subject: [PATCH] LibIDL: Parse extended attributes before `required` keyword --- Libraries/LibIDL/IDLParser.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Libraries/LibIDL/IDLParser.cpp b/Libraries/LibIDL/IDLParser.cpp index de5cc6e26b7..31106c8e69c 100644 --- a/Libraries/LibIDL/IDLParser.cpp +++ b/Libraries/LibIDL/IDLParser.cpp @@ -955,13 +955,16 @@ void Parser::parse_dictionary(Interface& interface) bool required = false; HashMap extended_attributes; + if (lexer.consume_specific('[')) + extended_attributes = parse_extended_attributes(); + if (lexer.consume_specific("required"sv)) { required = true; consume_whitespace(); } if (lexer.consume_specific('[')) - extended_attributes = parse_extended_attributes(); + extended_attributes.update(parse_extended_attributes()); auto type = parse_type(); consume_whitespace();