Files
hakorune/docs/development/current/main/phases/phase-288/README.md

34 lines
1.4 KiB
Markdown
Raw Normal View History

# Phase 288: REPL mode (design-first, file-mode unaffected)
Status: ✅ P0P3 complete (2025-12-25) / ⏳ 288.1 next
Goal: Add an interactive REPL for Nyash while keeping file mode semantics unchanged and keeping the language SSOT stable.
SSOT:
- REPL spec: `docs/reference/language/repl.md`
## Scope
- CLI entry: `hakorune --repl` / `-i`
- REPL commands: `.help`, `.exit/.quit`, `.reset`
- Fail-Fast: undefined reads are errors
- File mode: no behavior changes (quick smokes remain green)
## Completed (P0P3)
-**P0 (docs)**: REPL SSOT 確立 — file mode vs REPL mode 意味論、VMValue 永続化方針 (`docs/reference/language/repl.md` 336行)
-**P1 (CLI)**: `--repl` / `-i` 起動、.help/.exit/.reset コマンド、REPL ループ実装
-**P2 (state)**: `ReplSessionBox` (VMValue ベース) 実装、暗黙 local 許可file mode 不変、ValueId 永続化回避)
-**P3 (UX)**: print() 出力表示、Main box wrapperVM entry point 修正)、.reset 実装
-**Box化**: `src/runner/repl/` モジュール分離ReplRunnerBox、runner/mod.rs -118行 (commit: 3445ef7a7)
## Next (Phase 288.1)
The MVP intentionally deferred these:
- Session variable **persistence across lines** (bridge session → compilation/runtime)
- Expression auto-display + `_` last-value binding
- Multi-line input handling (continuations)
Entry: `docs/development/current/main/phases/phase-288/P1-INSTRUCTIONS.md`