LibIDL: Support extended attributes on namespace members

Specifically, this is so that ImplementedAs can be used on them.
This commit is contained in:
Sam Atkins 2025-09-02 15:43:54 +01:00
commit 66710f0065
Notes: github-actions[bot] 2025-09-11 16:07:53 +00:00

View file

@ -842,6 +842,8 @@ void Parser::parse_namespace(Interface& interface)
assert_specific('{');
for (;;) {
HashMap<ByteString, ByteString> extended_attributes;
consume_whitespace();
if (lexer.consume_specific('}')) {
@ -850,7 +852,12 @@ void Parser::parse_namespace(Interface& interface)
break;
}
HashMap<ByteString, ByteString> 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);
}