feat(joinir): Phase 92 P0-3 - ConditionalStep → JoinIR Select generation

Complete implementation of P5b escape sequence handling pattern lowering:

Core changes:
- skeleton_types.rs: Add `cond` field to ConditionalStep for escape condition
- escape_pattern_recognizer.rs: Extract and return escape_cond AST
- pattern_recognizer.rs: Pass escape_cond to ConditionalStep
- canonicalizer.rs: Store escape_cond in ConditionalStep variant

JoinIR lowering:
- carrier_update_emitter.rs: Add emit_conditional_step_update() function
  - Lower condition AST via lower_condition_to_joinir
  - Compute both then/else branches (carrier + delta)
  - Emit JoinInst::Select for conditional carrier update
- loop_with_break_minimal.rs: Add skeleton parameter, detect ConditionalStep
- pattern2_with_break.rs: Pass skeleton to lowering function

Backward compatibility:
- skeleton=None preserves existing Pattern1-4 behavior
- fixtures.rs, tests.rs updated for new signature

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
nyash-codex
2025-12-16 15:36:36 +09:00
parent 51017a0f9a
commit a718af3213
9 changed files with 178 additions and 14 deletions

View File

@ -132,6 +132,7 @@ pub fn build_pattern2_minimal_structured() -> JoinModule {
&[],
None,
&mut join_value_space,
None, // Phase 92 P0-3: skeleton=None for backward compatibility
)
.expect("pattern2 minimal lowering should succeed");