fix(joinir): Phase 170-B Break condition delegation to condition_to_joinir
Remove hardcoded break condition (i >= 2) from loop_with_break_minimal.rs. Now delegates to condition_to_joinir for dynamic break condition lowering. Changes: - Add extract_break_condition() to ast_feature_extractor.rs - Pattern2 lowerer extracts break condition AST and passes to lowerer - loop_with_break_minimal.rs uses BoolExprLowerer instead of hardcoded values - Add TrimTest.main/0 to JoinIR routing whitelist Box Theory compliance: - Single responsibility: Pattern2 handles structure, condition_to_joinir handles lowering - Zero hardcoding: All break conditions now dynamic Verified: - test_loop_return.hako (i >= 2) → RC: 2 ✅ - test_trim_loop.hako (i >= 3) → RC: 3 ✅ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -76,6 +76,7 @@ impl MirBuilder {
|
||||
"TrimTest.trim/1" => true,
|
||||
"Main.trim/1" => true, // Phase 171-fix: Main box variant
|
||||
"Main.trim_string_simple/1" => true, // Phase 33-13: Simple trim variant
|
||||
"TrimTest.main/0" => true, // Phase 170: TrimTest.main for loop pattern test
|
||||
_ => false,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user