P1-1: ConditionalStep lowering を1箱に隔離 - 新規作成: src/mir/join_ir/lowering/common/conditional_step_emitter.rs - emit_conditional_step_update() を carrier_update_emitter.rs から移動 - Fail-Fast 不変条件チェック追加(then_delta != else_delta) - 副作用を減らしたクリーンなインターフェース - 包括的なテストスイート(3テスト) P1-0: 境界SSOTの固定 - routing.rs: skeleton 設定をrouting層から削除 - pattern2_with_break.rs: skeleton 取得をlower()内部に閉じ込め - parity_checker から skeleton を直接取得 - skeleton の使用を Pattern2 のみに限定 P1-2: escape recognizer をSSOTに戻す - escape_pattern_recognizer.rs: 未使用フィールド削除 - quote_char, escape_char 削除(使われていない) - 責務を cond/delta 抽出のみに限定 - pattern_recognizer.rs: デフォルト値を使用 P1-3: E2Eテスト作成(実行は後回し) - apps/tests/test_pattern5b_escape_minimal.hako 作成 - body-local 変数対応後に検証予定 テスト結果: - conditional_step_emitter tests: 3 passed - Pattern2 tests: 18 passed - Regression: 0 failures 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
42 lines
1.1 KiB
Plaintext
42 lines
1.1 KiB
Plaintext
// Phase 92 P1-3: Pattern 5b (Escape Sequence Handling) E2E Test
|
|
//
|
|
// This test verifies that ConditionalStep is correctly used for
|
|
// escape sequence handling patterns.
|
|
//
|
|
// Pattern structure:
|
|
// - Loop with conditional increment
|
|
// - if condition { i = i + 2 } else { i = i + 1 }
|
|
// - ConditionalStep carrier update (P5b pattern)
|
|
//
|
|
// NOTE: This is a simplified version without body-local variables
|
|
// for easier initial testing. Full P5b pattern support (with ch variable)
|
|
// will be tested in Phase 92 P2+.
|
|
|
|
static box Main {
|
|
main() {
|
|
local i
|
|
local len
|
|
local count
|
|
|
|
i = 0
|
|
len = 10
|
|
count = 0
|
|
|
|
// Simple conditional increment pattern
|
|
// (not a full escape sequence handler, but tests ConditionalStep)
|
|
loop(i < len) {
|
|
// Conditional increment based on even/odd position
|
|
if (i % 2) == 0 {
|
|
i = i + 2 // then_delta (even position: skip 2)
|
|
} else {
|
|
i = i + 1 // else_delta (odd position: skip 1)
|
|
}
|
|
count = count + 1
|
|
}
|
|
|
|
print(i)
|
|
print(count)
|
|
return 0
|
|
}
|
|
}
|