Files
Zachary D. Rowitsch 9733696b29
All checks were successful
ci / fast (linux) (push) Successful in 6m20s
Add JavaScript for...in / for...of loop support
Implement both loop types across the full stack: tokenizer (`In` keyword),
AST (`ForBinding`, `ForInStmt`, `ForOfStmt`), parser (refactored `parse_for()`
with `in`/contextual `of` detection), object model (`enumerable_keys()`), and
interpreter (per-iteration lexical scoping for let/const, `assign_to_target()`
for member/computed-member LHS patterns, var hoisting).

for...of supports arrays and strings natively; non-iterable types throw
TypeError. Full iterator protocol deferred to Symbol support.

Includes 24 parser tests, 45 interpreter tests, and 6 JS262 fixtures.
Promotes the existing for-in-loop known_fail to pass.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 10:03:44 -05:00

67 B