mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibJS: Integrate iterator protocol into language features
Finally use Symbol.iterator protocol in language features :) currently only used in for-of loops and spread expressions, but will have more uses later (Maps, Sets, Array.from, etc).
This commit is contained in:
parent
4970c448bf
commit
a51b2393f2
Notes:
sideshowbarker
2024-07-19 04:50:05 +09:00
Author: https://github.com/mattco98
Commit: a51b2393f2
Pull-request: https://github.com/SerenityOS/serenity/pull/2791
8 changed files with 187 additions and 127 deletions
|
@ -200,7 +200,6 @@ class ExpectationError extends Error {
|
|||
|
||||
toContain(item) {
|
||||
this.__doMatcher(() => {
|
||||
// FIXME: Iterator check
|
||||
for (let element of this.target) {
|
||||
if (item === element) return;
|
||||
}
|
||||
|
@ -211,7 +210,6 @@ class ExpectationError extends Error {
|
|||
|
||||
toContainEqual(item) {
|
||||
this.__doMatcher(() => {
|
||||
// FIXME: Iterator check
|
||||
for (let element of this.target) {
|
||||
if (deepEquals(item, element)) return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue