Phase 61: structural if-sum+break lowering (dev-only)

This commit is contained in:
nyash-codex
2025-12-12 22:15:41 +09:00
parent 6aba138950
commit acb6720d9b
13 changed files with 1140 additions and 39 deletions

View File

@ -189,6 +189,18 @@ impl AstToJoinIrLowerer {
}
}
/// Phase 60 dev-only helper: legacy Break(P2) lowering for comparison tests.
///
/// `loop_patterns` is private, so this wrapper is exposed at the ast_lowerer boundary.
#[cfg(feature = "normalized_dev")]
pub fn lower_break_legacy_for_comparison(
lowerer: &mut AstToJoinIrLowerer,
program_json: &serde_json::Value,
) -> JoinModule {
loop_patterns::break_pattern::lower_break_legacy_for_comparison(lowerer, program_json)
.unwrap_or_else(|e| panic!("legacy break lowering failed: {:?}", e))
}
impl Default for AstToJoinIrLowerer {
fn default() -> Self {
Self::new()