Parent: #36
Depends on: #35
Goal
Complete the structural HIR→WIR mapping for the OPY program skeleton without expanding into the full statement/expression compatibility surface.
Scope
- Lower global/player variable declarations with reference-compatible index allocation and preserved source/name spans.
- Lower subroutine declarations and definitions into canonical
workshop-rs subroutine/rule structures.
- Lower rules, disabled state, event identity/filter structure, conditions container, and source presentation metadata that belongs on canonical WIR nodes.
- Preserve OPY source-file/span provenance through every structural node and diagnostic.
- Use existing
workshop-rs WIR/validation contracts directly; do not add another Workshop IR.
- Keep unsupported event/filter/annotation forms explicit as structured integration diagnostics.
Non-goals
- Full statement/expression lowering.
- Catalog-backed builtin/member/enum closure.
- Settings, locale, optimizer directives, post-compile hooks, or decompilation.
Acceptance criteria
- Declared variables/subroutines/rules map to structurally valid canonical WIR with deterministic allocation.
- Source/name spans remain usable after HIR→WIR conversion.
- Supported event structures validate; unsupported forms fail explicitly.
opy-frontend remains Workshop-independent.
- Focused positive/negative integration fixtures and workspace CI are green.
Parent: #36
Depends on: #35
Goal
Complete the structural HIR→WIR mapping for the OPY program skeleton without expanding into the full statement/expression compatibility surface.
Scope
workshop-rssubroutine/rule structures.workshop-rsWIR/validation contracts directly; do not add another Workshop IR.Non-goals
Acceptance criteria
opy-frontendremains Workshop-independent.