Iterator.h 435 B

123456789101112131415161718192021
  1. /*
  2. * Copyright (c) 2022, Linus Groh <linusg@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibJS/Runtime/Object.h>
  8. #include <LibJS/Runtime/Value.h>
  9. namespace JS {
  10. // 7.4.1 Iterator Records, https://tc39.es/ecma262/#sec-iterator-records
  11. struct Iterator {
  12. GCPtr<Object> iterator; // [[Iterator]]
  13. Value next_method; // [[NextMethod]]
  14. bool done { false }; // [[Done]]
  15. };
  16. }