LibIDL+LibWeb: Begin support for async iterator in IDL

This adds support for async iterators of the form:

    async iterable<value_type>;
    async iterable<value_type>(/* arguments... */);

It does not yet support the value pairs of the form:

    async iterable<key_type, value_type>;
    async iterable<key_type, value_type>(/* arguments... */);

Async iterators have an optional `return` data property. There's not a
particularly good way to know what interfaces implement this property.
So this adds a new extended attribute, DefinesAsyncIteratorReturn, which
interfaces can use to declare their support.
This commit is contained in:
Timothy Flynn 2025-04-12 13:18:02 -04:00 committed by Tim Flynn
commit c0ead1b01a
Notes: github-actions[bot] 2025-04-14 21:44:24 +00:00
10 changed files with 593 additions and 7 deletions

View file

@ -58,6 +58,7 @@ private:
void parse_deleter(HashMap<ByteString, ByteString>& extended_attributes, Interface&);
void parse_stringifier(HashMap<ByteString, ByteString>& extended_attributes, Interface&);
void parse_iterable(Interface&);
void parse_async_iterable(Interface&);
void parse_setlike(Interface&, bool is_readonly);
Function parse_function(HashMap<ByteString, ByteString>& extended_attributes, Interface&, IsStatic is_static = IsStatic::No, IsSpecialOperation is_special_operation = IsSpecialOperation::No);
Vector<Parameter> parse_parameters();