LibIDL: Save parsed stringifier_extended_attributes

This commit is contained in:
Bastiaan van der Plaat 2025-04-30 17:20:11 +02:00 committed by Andrew Kaster
commit 41a6ebfba2
Notes: github-actions[bot] 2025-06-30 17:40:45 +00:00
2 changed files with 3 additions and 0 deletions

View file

@ -505,7 +505,9 @@ void Parser::parse_stringifier(HashMap<ByteString, ByteString>& extended_attribu
if (lexer.next_is("attribute"sv) || lexer.next_is("inherit"sv) || lexer.next_is("readonly"sv)) { if (lexer.next_is("attribute"sv) || lexer.next_is("inherit"sv) || lexer.next_is("readonly"sv)) {
parse_attribute(extended_attributes, interface); parse_attribute(extended_attributes, interface);
interface.stringifier_attribute = interface.attributes.last(); interface.stringifier_attribute = interface.attributes.last();
interface.stringifier_extended_attributes = interface.stringifier_attribute->extended_attributes;
} else { } else {
interface.stringifier_extended_attributes = move(extended_attributes);
assert_specific(';'); assert_specific(';');
} }
} }

View file

@ -280,6 +280,7 @@ public:
Vector<Function> functions; Vector<Function> functions;
Vector<Function> static_functions; Vector<Function> static_functions;
bool has_stringifier { false }; bool has_stringifier { false };
Optional<HashMap<ByteString, ByteString>> stringifier_extended_attributes;
Optional<Attribute> stringifier_attribute; Optional<Attribute> stringifier_attribute;
bool has_unscopable_member { false }; bool has_unscopable_member { false };