Skip to content

Support player-variable range-for binders #65

Description

@Teakowa

Goal

Add the pinned OverPy player-variable for ... in range(...) binder form to the bounded OPY-to-Workshop lowering surface.

Context

Issue #47 / PR #61 intentionally narrows its supported range-for claim to global-variable binders. The pinned OverPy loop corpus also supports forms such as for hostPlayer.I in range(3) and emits canonical For Player Variable(...) Workshop behavior. This is a known non-gating gap and should remain explicit rather than being lost after #47 closes.

Scope

  • Establish minimized pinned-oracle evidence for player-variable range binders.
  • Preserve player receiver/binder provenance through HIR and compiler lowering.
  • Lower supported forms through the existing canonical workshop-rs player-variable loop contract.
  • Add positive and negative source-level fixtures for the supported binder boundary.
  • Update compatibility/support claims only when executable evidence exists.

Non-goals

Acceptance Criteria

  • A pinned source case equivalent to for hostPlayer.I in range(3) reaches canonical For Player Variable WIR/emission with semantic/structural oracle equivalence.
  • Binder/receiver source provenance is preserved.
  • Unsupported binder forms fail with stable source-attributed diagnostics.
  • Existing global-binder range-for behavior does not regress.
  • Support documentation distinguishes the proven global/player binder forms from still-unsupported iterable forms.

Dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions