Skip to content

Language: foreach by-reference ($k => &$v) #1222

Description

@PurHur

Summary

Implement foreach loops that assign by reference, including nested references and array modification during iteration.

Context

  • See docs/unsupported-syntax.md and docs/capabilities-syntax.md.
  • North Star 2 self-host: #1056.

Acceptance criteria

  • Parser + CFG lowering for the construct
  • VM semantics with regression tests
  • LLVM JIT lowering (or explicit stub policy in SelfHostBuiltinPolicy)
  • Bootstrap fixture if required for self-host probe
  • Documentation updated

Related issues

#140 (references), #66 (arrays)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions