-
-
Notifications
You must be signed in to change notification settings - Fork 64
feat: add support for parsing async iterable<T>
type
#775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lucacasonato
wants to merge
4
commits into
w3c:main
Choose a base branch
from
lucacasonato:async_iterable_type
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
88cb13f
feat: add support for parsing `async iterable<T>` type
lucacasonato 25d01c0
Merge branch 'main' into async_iterable_type
lucacasonato 6f9191f
Merge branch 'main' into async_iterable_type
saschanaz 7d78f2c
it can be return type of operations
saschanaz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,24 @@ | ||
(attr-invalid-type) Validation error at line 3 in invalid-attribute.webidl, inside `interface sequenceAsAttribute -> attribute invalid`: | ||
attribute sequence<short> invalid; | ||
^ Attributes cannot accept sequence types. | ||
(attr-invalid-type) Validation error at line 9 in invalid-attribute.webidl, inside `interface recordAsAttribute -> attribute invalid`: | ||
(attr-invalid-type) Validation error at line 9 in invalid-attribute.webidl, inside `interface asyncIterableAsAttribute -> attribute invalid`: | ||
async iterable<short> invalid; | ||
^ Attributes cannot accept async iterable types. | ||
(attr-invalid-type) Validation error at line 15 in invalid-attribute.webidl, inside `interface recordAsAttribute -> attribute invalid`: | ||
<DOMString, DOMString> invalid; | ||
^ Attributes cannot accept record types. | ||
(attr-invalid-type) Validation error at line 17 in invalid-attribute.webidl, inside `interface dictionaryAsAttribute -> attribute dict`: | ||
(attr-invalid-type) Validation error at line 23 in invalid-attribute.webidl, inside `interface dictionaryAsAttribute -> attribute dict`: | ||
attribute Dict dict; | ||
^ Attributes cannot accept dictionary types. | ||
(attr-invalid-type) Validation error at line 18 in invalid-attribute.webidl, inside `interface dictionaryAsAttribute -> attribute dictUnion`: | ||
(attr-invalid-type) Validation error at line 24 in invalid-attribute.webidl, inside `interface dictionaryAsAttribute -> attribute dictUnion`: | ||
attribute (Dict or boolean) dictUnion | ||
^ Attributes cannot accept dictionary types. | ||
(attr-invalid-type) Validation error at line 28 in invalid-attribute.webidl, inside `interface EnforceRangeInReadonlyAttribute -> attribute readOnlyAttr1`: | ||
(attr-invalid-type) Validation error at line 34 in invalid-attribute.webidl, inside `interface EnforceRangeInReadonlyAttribute -> attribute readOnlyAttr1`: | ||
readonly attribute [EnforceRange] long readOnlyAttr1; | ||
^ Readonly attributes cannot accept [EnforceRange] extended attribute. | ||
(attr-invalid-type) Validation error at line 29 in invalid-attribute.webidl, inside `interface EnforceRangeInReadonlyAttribute -> attribute readOnlyAttr2`: | ||
(attr-invalid-type) Validation error at line 35 in invalid-attribute.webidl, inside `interface EnforceRangeInReadonlyAttribute -> attribute readOnlyAttr2`: | ||
readonly attribute [EnforceRange] GPUInt32In readOnlyAttr2; | ||
^ Readonly attributes cannot accept [EnforceRange] extended attribute. | ||
(attr-invalid-type) Validation error at line 30 in invalid-attribute.webidl, inside `interface EnforceRangeInReadonlyAttribute -> attribute readOnlyAttr2`: | ||
(attr-invalid-type) Validation error at line 36 in invalid-attribute.webidl, inside `interface EnforceRangeInReadonlyAttribute -> attribute readOnlyAttr2`: | ||
readonly attribute GPUInt32 readOnlyAttr2; | ||
^ Readonly attributes cannot accept [EnforceRange] extended attribute. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
(operation-return-invalid-type) Validation error at line 1 in invalid-callback-argument.webidl, inside `callback DoSomething -> argument bool`: | ||
async iterable<DOMString> bool); | ||
^ Callback function arguments can not be async iterable types. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
callback DoSomething = Promise<DOMString> (async iterable<DOMString> bool); |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,200 @@ | ||
[ | ||
{ | ||
"type": "interface", | ||
"name": "Canvas", | ||
"inheritance": null, | ||
"members": [ | ||
{ | ||
"type": "operation", | ||
"name": "drawPolygonAsync", | ||
"idlType": { | ||
"type": "return-type", | ||
"extAttrs": [], | ||
"generic": "Promise", | ||
"nullable": false, | ||
"union": false, | ||
"idlType": [ | ||
{ | ||
"type": "return-type", | ||
"extAttrs": [], | ||
"generic": "", | ||
"nullable": false, | ||
"union": false, | ||
"idlType": "undefined" | ||
} | ||
] | ||
}, | ||
"arguments": [ | ||
{ | ||
"type": "argument", | ||
"name": "coordinates", | ||
"extAttrs": [], | ||
"idlType": { | ||
"type": "argument-type", | ||
"extAttrs": [], | ||
"generic": "async iterable", | ||
"nullable": false, | ||
"union": false, | ||
"idlType": [ | ||
{ | ||
"type": "argument-type", | ||
"extAttrs": [], | ||
"generic": "", | ||
"nullable": false, | ||
"union": false, | ||
"idlType": "float" | ||
} | ||
] | ||
}, | ||
"default": null, | ||
"optional": false, | ||
"variadic": false | ||
} | ||
], | ||
"extAttrs": [], | ||
"special": "" | ||
} | ||
], | ||
"extAttrs": [], | ||
"partial": false | ||
}, | ||
{ | ||
"type": "interface", | ||
"name": "I", | ||
"inheritance": null, | ||
"members": [ | ||
{ | ||
"type": "operation", | ||
"name": "f1", | ||
"idlType": { | ||
"type": "return-type", | ||
"extAttrs": [], | ||
"generic": "Promise", | ||
"nullable": false, | ||
"union": false, | ||
"idlType": [ | ||
{ | ||
"type": "return-type", | ||
"extAttrs": [], | ||
"generic": "", | ||
"nullable": false, | ||
"union": false, | ||
"idlType": "undefined" | ||
} | ||
] | ||
}, | ||
"arguments": [ | ||
{ | ||
"type": "argument", | ||
"name": "arg", | ||
"extAttrs": [], | ||
"idlType": { | ||
"type": "argument-type", | ||
"extAttrs": [], | ||
"generic": "async iterable", | ||
"nullable": false, | ||
"union": false, | ||
"idlType": [ | ||
{ | ||
"type": "argument-type", | ||
"extAttrs": [ | ||
{ | ||
"type": "extended-attribute", | ||
"name": "XAttr", | ||
"rhs": null, | ||
"arguments": [] | ||
} | ||
], | ||
"generic": "", | ||
"nullable": false, | ||
"union": false, | ||
"idlType": "float" | ||
} | ||
] | ||
}, | ||
"default": null, | ||
"optional": false, | ||
"variadic": false | ||
} | ||
], | ||
"extAttrs": [], | ||
"special": "" | ||
} | ||
], | ||
"extAttrs": [], | ||
"partial": false | ||
}, | ||
{ | ||
"type": "interface", | ||
"name": "asyncIterableReturn", | ||
"inheritance": null, | ||
"members": [ | ||
{ | ||
"type": "operation", | ||
"name": "stream", | ||
"idlType": { | ||
"type": "return-type", | ||
"extAttrs": [], | ||
"generic": "async iterable", | ||
"nullable": false, | ||
"union": false, | ||
"idlType": [ | ||
{ | ||
"type": "return-type", | ||
"extAttrs": [], | ||
"generic": "", | ||
"nullable": false, | ||
"union": false, | ||
"idlType": "short" | ||
} | ||
] | ||
}, | ||
"arguments": [ | ||
{ | ||
"type": "argument", | ||
"name": "foo", | ||
"extAttrs": [], | ||
"idlType": { | ||
"type": "argument-type", | ||
"extAttrs": [], | ||
"generic": "async iterable", | ||
"nullable": false, | ||
"union": false, | ||
"idlType": [ | ||
{ | ||
"type": "argument-type", | ||
"extAttrs": [], | ||
"generic": "", | ||
"nullable": false, | ||
"union": false, | ||
"idlType": "short" | ||
} | ||
] | ||
}, | ||
"default": null, | ||
"optional": false, | ||
"variadic": false | ||
} | ||
], | ||
"extAttrs": [], | ||
"special": "" | ||
} | ||
], | ||
"extAttrs": [ | ||
{ | ||
"type": "extended-attribute", | ||
"name": "Exposed", | ||
"rhs": { | ||
"type": "identifier", | ||
"value": "Window" | ||
}, | ||
"arguments": [] | ||
} | ||
], | ||
"partial": false | ||
}, | ||
{ | ||
"type": "eof", | ||
"value": "" | ||
} | ||
] |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
interface Canvas { | ||
Promise<undefined> drawPolygonAsync(async iterable<float> coordinates); | ||
}; | ||
|
||
interface I { | ||
Promise<undefined> f1(async iterable<[XAttr] float> arg); | ||
}; | ||
|
||
[Exposed=Window] | ||
interface asyncIterableReturn { | ||
async iterable<short> stream(async iterable<short> foo); | ||
}; |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.