LibIDL: Parse extended attributes before required keyword

This commit is contained in:
ahl-trifork 2025-08-05 19:38:55 +02:00 committed by Sam Atkins
commit e534395243
Notes: github-actions[bot] 2025-08-06 17:20:08 +00:00

View file

@ -955,13 +955,16 @@ void Parser::parse_dictionary(Interface& interface)
bool required = false;
HashMap<ByteString, ByteString> 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();