refactor(vm): Phase 4 - Void Guard統一化(重複削減)

boxes_void_guards.rs新規作成で28行の重複を排除

実装内容:
- handle_void_method()ヘルパー関数作成
- 7種類のメソッド(is_eof/length/substring/push/get_position/get_line/get_column)統一
- boxes.rs: 30行→18行(12行削減)
- 重複ブロック2箇所→シングルソース化

効果:
- 保守性向上: 単一の真実の源(Single Source of Truth)
- 可読性向上: 大きなmatchブロック→簡潔なヘルパー呼び出し
- バグ修正容易化: 1箇所修正で全体に反映

テスト: Void.is_eof(), Void.length()正常動作確認
This commit is contained in:
nyash-codex
2025-11-01 13:41:43 +09:00
parent 6a452b2dca
commit 9be50f0a0c
4 changed files with 51 additions and 22 deletions

View File

@ -8,6 +8,7 @@ mod boxes_map;
mod boxes_object_fields;
mod boxes_instance;
mod boxes_plugin;
mod boxes_void_guards;
mod calls;
mod externals;
mod memory;