From 66710f00656e07963e623473ede7e6700eed9d69 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Tue, 2 Sep 2025 15:43:54 +0100 Subject: [PATCH] LibIDL: Support extended attributes on namespace members Specifically, this is so that ImplementedAs can be used on them. --- Libraries/LibIDL/IDLParser.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Libraries/LibIDL/IDLParser.cpp b/Libraries/LibIDL/IDLParser.cpp index 3210d1b6128..069c18514f3 100644 --- a/Libraries/LibIDL/IDLParser.cpp +++ b/Libraries/LibIDL/IDLParser.cpp @@ -842,6 +842,8 @@ void Parser::parse_namespace(Interface& interface) assert_specific('{'); for (;;) { + HashMap extended_attributes; + consume_whitespace(); if (lexer.consume_specific('}')) { @@ -850,7 +852,12 @@ void Parser::parse_namespace(Interface& interface) break; } - HashMap extended_attributes; + if (lexer.consume_specific('[')) { + extended_attributes = parse_extended_attributes(); + if (!interface.has_unscopable_member && extended_attributes.contains("Unscopable")) + interface.has_unscopable_member = true; + } + parse_function(extended_attributes, interface); }