✨ feat: ArrayBox完全実装 - Nyash初の動的配列コレクション!
## 🎯 実装内容 - ArrayBoxにNyashBoxトレイト完全実装 - Arc<Mutex>による内部可変性実現(MapBoxと同じパターン) - 全メソッド実装: push/pop/get/set/length/indexOf/contains/join/clear/remove - 包括的なテストスイート作成 ## 🔧 技術的改善 - GitHub Copilot作成の基本構造をNyash対応に拡張 - execute_array_methodを&self参照に修正 - collection_methods.rsとの統合完了 ## ✅ テスト結果 - 全機能正常動作確認 - 異なる型の要素混在可能(Everything is Box哲学) - インデックス範囲外アクセスでNullBox返却 ## 📝 残課題 - BufferBox, ResultBox, FileBox等は基本構造のみ(未実装) - RegexBoxはNyashBoxトレイト実装済みだがregex依存関係未追加 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -8,6 +8,7 @@
|
||||
|
||||
use super::*;
|
||||
use crate::ast::UnaryOperator;
|
||||
use crate::boxes::array::ArrayBox;
|
||||
// TODO: Fix NullBox import issue later
|
||||
// use crate::NullBox;
|
||||
|
||||
@ -326,6 +327,8 @@ impl NyashInterpreter {
|
||||
return self.execute_array_method(array_box, method, arguments);
|
||||
}
|
||||
|
||||
// TODO: 以下のBoxはまだ実装されていない
|
||||
/*
|
||||
// FileBox method calls
|
||||
if let Some(file_box) = obj_value.as_any().downcast_ref::<FileBox>() {
|
||||
return self.execute_file_method(file_box, method, arguments);
|
||||
@ -345,6 +348,7 @@ impl NyashInterpreter {
|
||||
if let Some(channel_box) = obj_value.as_any().downcast_ref::<ChannelBox>() {
|
||||
return self.execute_channel_method(channel_box, method, arguments);
|
||||
}
|
||||
*/
|
||||
|
||||
// MathBox method calls
|
||||
if let Some(math_box) = obj_value.as_any().downcast_ref::<MathBox>() {
|
||||
|
||||
Reference in New Issue
Block a user