ResultBox migration (stage 0): suppress legacy deprecation warnings in box_trait impls; keep dual handling in VM. Fix verifier Display for SuspiciousBarrierContext. Expose VM stats fields to vm_stats module. CLI core_ci guide and script in place.
This commit is contained in:
56
ideas/new-features/2025-08-25-repl-mode.md
Normal file
56
ideas/new-features/2025-08-25-repl-mode.md
Normal file
@ -0,0 +1,56 @@
|
||||
# REPL (Read-Eval-Print Loop) モード
|
||||
Status: Idea
|
||||
Created: 2025-08-25
|
||||
Priority: Medium
|
||||
Related: CLI機能拡張
|
||||
|
||||
## 概要
|
||||
Nyashの対話的実行環境。Pythonのような即座にコードを試せる環境を提供。
|
||||
|
||||
## 想定される使用例
|
||||
```bash
|
||||
$ nyash --repl
|
||||
Nyash REPL v1.0.0
|
||||
>>> local x = 42
|
||||
>>> print(x + 8)
|
||||
50
|
||||
>>> box Point { init { x, y } }
|
||||
>>> local p = new Point()
|
||||
>>> p.x = 10
|
||||
>>> p.y = 20
|
||||
>>> print(p)
|
||||
Point { x: 10, y: 20 }
|
||||
>>> exit()
|
||||
```
|
||||
|
||||
## 実装案
|
||||
### Phase 1: 基本REPL
|
||||
- 単一行の評価と実行
|
||||
- 変数の永続化
|
||||
- 基本的なエラーハンドリング
|
||||
|
||||
### Phase 2: 高度な機能
|
||||
- 複数行入力(継続行)のサポート
|
||||
- ヒストリー機能(上下キーで履歴)
|
||||
- タブ補完(変数名、メソッド名)
|
||||
- `.help`、`.clear`などのメタコマンド
|
||||
|
||||
### Phase 3: デバッグ統合
|
||||
- ブレークポイント設定
|
||||
- 変数の詳細表示
|
||||
- メモリ使用状況の確認
|
||||
|
||||
## 技術的考慮事項
|
||||
- 現在のインタープリター構造との統合
|
||||
- 状態管理(グローバルスコープの扱い)
|
||||
- rustyline等のREPLライブラリの活用
|
||||
|
||||
## 実装タイミング
|
||||
- [ ] 基本的な開発ツールが整った後
|
||||
- [ ] ユーザーからの要望が多い場合
|
||||
- [ ] 教育用途での需要が高まった場合
|
||||
|
||||
## 参考
|
||||
- Python REPL
|
||||
- Node.js REPL
|
||||
- Rust playground(Web版も検討)
|
||||
Reference in New Issue
Block a user