Files
hakorune/src/runner/repl/mod.rs
tomoaki 3445ef7a7d 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>
2025-12-25 14:06:22 +09:00

23 lines
622 B
Rust
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//! 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()
}