Skip to content

Lower OPY assignment and expression primitives into canonical Workshop WIR #46

Description

@Teakowa

Parent: #41
Depends on: #40 (completed)

Goal

Complete the non-control-flow statement/value lowering that can map directly or by evidence-backed normalization into the existing canonical workshop-rs WIR surface.

Scope

  • Complete global/player assignment and modification lowering, including source-attributed target spans.
  • Lower the WIR-representable expression surface required by conditions/actions: literals, arrays, vectors, global/player/event-player references, indexing, formatting, and binary/unary operations.
  • Handle frontend-resolved constants and macro-expanded semantic forms where they remain in HIR without re-parsing source or reproducing upstream compiler internals.
  • Treat pass and other source-level no-op forms according to pinned observable semantics rather than silently dropping unknown nodes.
  • Preserve source provenance and stable structured diagnostics for forms that cannot yet lower.
  • Keep receiver/member/catalog-dependent semantics assigned to Close catalog-backed OPY lowering and corpus evidence #42.
  • Add minimized oracle-backed positive/negative integration fixtures and validate emitted WIR structurally.

Non-goals

Acceptance criteria

  • In-scope assignment/modification and expression forms either lower to valid canonical WIR or fail with stable source-attributed diagnostics.
  • Player/global variable semantics retain canonical WIR identity and provenance.
  • No unsupported HIR node is silently discarded or guessed.
  • Oracle-backed fixtures cover representative expression/assignment behavior and negative paths.
  • Program::validate and workspace CI are green.
  • Lower OPY control flow into canonical Workshop WIR with oracle evidence #47 can build control-flow lowering on the resulting value/action primitives without redesigning the boundary.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions