🧹 refactor: box_methods.rs大掃除完全成功 - 8モジュールに機能分離
🏗️ アーキテクチャ大幅改善: • 1822行巨大ファイル → 8つの論理的モジュールに完全分割 • 機能別責任分離でメンテナンス性向上 • ゼロ破壊的変更 - 既存機能すべて正常動作 📂 新モジュール構造: • basic_methods.rs - StringBox/IntegerBox/BoolBox/FloatBox • collection_methods.rs - ArrayBox/MapBox • io_methods.rs - FileBox/ResultBox • system_methods.rs - TimeBox/DateTimeBox/TimerBox/DebugBox • math_methods.rs - MathBox/RandomBox • async_methods.rs - FutureBox/ChannelBox • web_methods.rs - WebDisplayBox/WebConsoleBox/WebCanvasBox(WASM) • special_methods.rs - MethodBox/SoundBox ✨ コード品質向上: • 可読性 - 機能別分離で理解容易 • 保守性 - 変更影響の局所化 • 拡張性 - 新機能追加が簡単 • テスト性 - 単体テスト作成容易 🎯 プロフェッショナルレベルのコードベース完成\! Everything is Box哲学の美しい実装構造達成 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -9,7 +9,7 @@
|
||||
use crate::ast::{ASTNode, BinaryOperator, CatchClause};
|
||||
use crate::box_trait::{NyashBox, StringBox, IntegerBox, BoolBox, VoidBox, AddBox, SubtractBox, MultiplyBox, DivideBox, CompareBox, ArrayBox, FileBox, ResultBox, ErrorBox, FutureBox};
|
||||
use crate::instance::InstanceBox;
|
||||
use crate::channel_box::{ChannelBox, MessageBox};
|
||||
use crate::channel_box::ChannelBox;
|
||||
use crate::boxes::math_box::{MathBox, FloatBox, RangeBox};
|
||||
use crate::boxes::time_box::{TimeBox, DateTimeBox, TimerBox};
|
||||
use crate::boxes::map_box::MapBox;
|
||||
@ -17,11 +17,16 @@ use crate::boxes::random_box::RandomBox;
|
||||
use crate::boxes::sound_box::SoundBox;
|
||||
use crate::boxes::debug_box::DebugBox;
|
||||
use crate::method_box::MethodBox;
|
||||
|
||||
// WASM-specific Box types (conditionally included)
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
use crate::boxes::web::{WebDisplayBox, WebConsoleBox, WebCanvasBox};
|
||||
use crate::finalization;
|
||||
use crate::exception_box;
|
||||
use std::collections::HashMap;
|
||||
|
||||
// Module declarations
|
||||
mod async_methods;
|
||||
mod box_methods;
|
||||
mod core;
|
||||
mod expressions;
|
||||
@ -29,6 +34,11 @@ mod statements;
|
||||
mod functions;
|
||||
mod objects;
|
||||
mod io;
|
||||
mod methods;
|
||||
mod math_methods;
|
||||
mod system_methods;
|
||||
mod web_methods;
|
||||
mod special_methods;
|
||||
|
||||
// Main interpreter implementation - will be moved from interpreter.rs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user