From 1ff75618c0775947d818fefbe907fc1a823e543d Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Wed, 15 Mar 2023 18:33:09 -0400 Subject: [PATCH] LibIDL: Allow extended attributes on non-required IDL dictionary members For example, WebAssembly.Memory will have: [EnforceRange] unsigned long maximum; --- Userland/Libraries/LibIDL/IDLParser.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibIDL/IDLParser.cpp b/Userland/Libraries/LibIDL/IDLParser.cpp index d320a1e36f..0e3683fcb9 100644 --- a/Userland/Libraries/LibIDL/IDLParser.cpp +++ b/Userland/Libraries/LibIDL/IDLParser.cpp @@ -727,10 +727,11 @@ void Parser::parse_dictionary(Interface& interface) if (lexer.consume_specific("required")) { required = true; consume_whitespace(); - if (lexer.consume_specific('[')) - extended_attributes = parse_extended_attributes(); } + if (lexer.consume_specific('[')) + extended_attributes = parse_extended_attributes(); + auto type = parse_type(); consume_whitespace();