summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/Iterator.h
blob: 4be4d65083fce02b38ae0c8ab7f7f917a681fc4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
 * Copyright (c) 2022, Linus Groh <linusg@serenityos.org>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#pragma once

#include <LibJS/Runtime/Object.h>
#include <LibJS/Runtime/Value.h>

namespace JS {

// 7.4.1 Iterator Records, https://tc39.es/ecma262/#sec-iterator-records
struct Iterator {
    Object* iterator { nullptr }; // [[Iterator]]
    Value next_method;            // [[NextMethod]]
    bool done { false };          // [[Done]]
};

}