箱理論モジュール化(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>
23 lines
622 B
Rust
23 lines
622 B
Rust
//! 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()
|
||
}
|