refactor(mir): Phase 140-P4-B - pattern_recognizer を SSOT 化(71 行削減)

- try_extract_skip_whitespace_pattern を ast_feature_extractor 呼び出しに変更
- 重複コード 100+ 行削減(250 → 179 行)
- crate-wide re-export chain 確立(ast_feature_extractor → patterns → joinir → control_flow → builder → mir)
- 全テスト PASS(14 tests)
- フォーマット適用

Phase 140-P4-A/P4-B 完了:SSOT 化成功
This commit is contained in:
nyash-codex
2025-12-16 07:09:22 +09:00
parent 759543c1f8
commit d0d3512be4
7 changed files with 27 additions and 82 deletions

View File

@ -13,3 +13,6 @@ pub(in crate::mir::builder) mod patterns;
pub(in crate::mir::builder) mod routing;
pub(in crate::mir::builder) mod routing_legacy_binding;
pub(in crate::mir::builder) mod trace;
// Phase 140-P4-A: Re-export for loop_canonicalizer SSOT (crate-wide visibility)
pub(crate) use patterns::{detect_skip_whitespace_pattern, SkipWhitespaceInfo};

View File

@ -64,3 +64,6 @@ pub(in crate::mir::builder) mod trim_pattern_validator;
// Re-export router for convenience
pub(in crate::mir::builder) use router::{route_loop_pattern, LoopPatternContext};
// Phase 140-P4-A: Re-export for loop_canonicalizer SSOT (crate-wide visibility)
pub(crate) use ast_feature_extractor::{detect_skip_whitespace_pattern, SkipWhitespaceInfo};

View File

@ -54,6 +54,9 @@ pub(in crate::mir::builder) mod exception;
// Phase 6: Utility functions
pub(in crate::mir::builder) mod utils;
// Phase 140-P4-A: Re-export for loop_canonicalizer SSOT (crate-wide visibility)
pub(crate) use joinir::{detect_skip_whitespace_pattern, SkipWhitespaceInfo};
impl super::MirBuilder {
/// Control-flow: block
pub(super) fn cf_block(&mut self, statements: Vec<ASTNode>) -> Result<ValueId, String> {