refactor(repl): Phase 288 Box化 - REPL Runner モジュール分離

箱理論モジュール化(Box-First):
- src/runner/repl/ 新規モジュール作成
- ReplRunnerBox: REPL実行器の完全隔離
- ReplSessionBox: mir/builder → runner/repl へ移動

File changes:
- src/runner/mod.rs: -118行(REPL コード削除)
- src/runner/repl/mod.rs: +22行(公開API)
- src/runner/repl/repl_runner.rs: +143行(ReplRunnerBox実装)
- src/runner/repl/repl_session.rs: moved from mir/builder/

Benefits:
- runner/mod.rs が綺麗(REPL 関連削除)
- REPL 機能が完全隔離(file mode への影響ゼロ保証)
- テスト容易性向上(Box 単体テスト可能)

Test results:
   REPL 動作確認(print/.reset/.exit)
   File mode regression: 154/154 pass

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-25 14:06:22 +09:00
parent 2b86b658d8
commit 3445ef7a7d
5 changed files with 178 additions and 126 deletions

22
src/runner/repl/mod.rs Normal file
View File

@ -0,0 +1,22 @@
//! REPL Module - Box-First Architecture
//!
//! Phase 288: Box化モジュール化
//! - ReplRunnerBox: REPL実行器の完全隔離
//! - ReplSessionBox: セッション状態の管理
//!
//! 公開API: run_repl() のみ
mod repl_runner;
mod repl_session;
use repl_runner::ReplRunnerBox;
use crate::cli::CliConfig;
/// Phase 288: REPL モード起動公開API
///
/// REPL ループを開始し、プログラムは終了しないnever returns
/// `.exit` コマンドで終了する。
pub(crate) fn run_repl(config: CliConfig) -> ! {
let runner = ReplRunnerBox::new(config);
runner.run()
}