Phase 1 complete: Unified import system implemented and tested

Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-08-11 20:32:25 +00:00
parent 0abdd9dbcf
commit 738a026466
12 changed files with 13 additions and 19 deletions

View File

@ -256,7 +256,7 @@ impl LiteralValue {
/// LiteralValueをNyashBoxに変換
pub fn to_nyash_box(&self) -> Box<dyn NyashBox> {
use crate::box_trait::{StringBox, IntegerBox, BoolBox, VoidBox};
use crate::boxes::math_box::FloatBox;
use crate::boxes::FloatBox;
match self {
LiteralValue::String(s) => Box::new(StringBox::new(s)),
@ -272,7 +272,7 @@ impl LiteralValue {
#[allow(unused_imports)]
use std::any::Any;
use crate::box_trait::{StringBox, IntegerBox, BoolBox, VoidBox};
use crate::boxes::math_box::FloatBox;
use crate::boxes::FloatBox;
if let Some(string_box) = box_val.as_any().downcast_ref::<StringBox>() {
Some(LiteralValue::String(string_box.value.clone()))

View File

@ -10,7 +10,7 @@
*/
use crate::box_trait::{NyashBox, StringBox, IntegerBox, BoolBox};
use crate::boxes::math_box::FloatBox;
use crate::boxes::FloatBox;
use crate::operator_traits::{
NyashAdd, NyashSub, NyashMul, NyashDiv,
DynamicAdd, DynamicSub, DynamicMul, DynamicDiv,

View File

@ -104,7 +104,7 @@
*/
use crate::box_trait::{BoxCore, BoxBase, NyashBox, StringBox, IntegerBox, BoolBox};
use crate::boxes::array::ArrayBox;
use crate::boxes::ArrayBox;
use std::fmt::{Debug, Display};
use std::any::Any;
use std::collections::HashMap;

View File

@ -34,9 +34,8 @@
*/
use crate::box_trait::{NyashBox, StringBox, BoolBox, BoxCore, BoxBase};
use crate::boxes::intent_box::IntentBox;
use crate::boxes::{IntentBox, MapBox};
pub use crate::boxes::intent_box::Message;
use crate::boxes::map_box::MapBox;
use std::any::Any;
use std::sync::{Arc, Mutex};
use std::collections::HashMap;

View File

@ -68,8 +68,7 @@
*/
use crate::box_trait::{NyashBox, StringBox, IntegerBox, BoolBox, BoxCore, BoxBase};
use crate::boxes::array::ArrayBox;
use crate::boxes::math_box::FloatBox;
use crate::boxes::{ArrayBox, FloatBox};
use std::fmt::{Debug, Display};
use std::any::Any;
use std::sync::{Arc, Mutex};

View File

@ -47,7 +47,7 @@
*/
use super::*;
use crate::boxes::null_box::NullBox;
use crate::boxes::NullBox;
impl NyashInterpreter {
// StringBox methods moved to methods/basic_methods.rs

View File

@ -9,8 +9,7 @@
use super::*;
use crate::ast::UnaryOperator;
use crate::boxes::{buffer::BufferBox, JSONBox, HttpClientBox, StreamBox, RegexBox, IntentBox, P2PBox};
use crate::boxes::math_box::FloatBox;
use crate::boxes::{MathBox, ConsoleBox, TimeBox, RandomBox, SoundBox, DebugBox, file::FileBox, MapBox};
use crate::boxes::{FloatBox, MathBox, ConsoleBox, TimeBox, RandomBox, SoundBox, DebugBox, file::FileBox, MapBox};
use crate::box_trait::BoolBox;
use crate::operator_traits::OperatorResolver;
// TODO: Fix NullBox import issue later

View File

@ -11,7 +11,7 @@
use super::super::*;
use crate::box_trait::{StringBox, IntegerBox, BoolBox, VoidBox};
use crate::boxes::math_box::FloatBox;
use crate::boxes::FloatBox;
impl NyashInterpreter {
/// StringBoxのメソッド呼び出しを実行

View File

@ -9,8 +9,7 @@
use super::super::*;
use crate::box_trait::{StringBox, IntegerBox, NyashBox, BoolBox};
use crate::boxes::array::ArrayBox;
use crate::boxes::map_box::MapBox;
use crate::boxes::{ArrayBox, MapBox};
impl NyashInterpreter {
/// ArrayBoxのメソッド呼び出しを実行

View File

@ -9,7 +9,7 @@
use super::super::*;
use crate::box_trait::{ResultBox, StringBox, NyashBox};
use crate::boxes::file::FileBox;
use crate::boxes::FileBox;
impl NyashInterpreter {
/// FileBoxのメソッド呼び出しを実行

View File

@ -7,9 +7,7 @@
*/
use super::*;
use crate::boxes::null_box::NullBox;
use crate::boxes::console_box::ConsoleBox;
use crate::boxes::math_box::FloatBox;
use crate::boxes::{NullBox, ConsoleBox, FloatBox};
// use crate::boxes::intent_box_wrapper::IntentBoxWrapper;
use std::sync::Arc;

View File

@ -13,7 +13,7 @@
*/
use super::*;
use crate::boxes::sound_box::SoundBox;
use crate::boxes::SoundBox;
use crate::method_box::MethodBox;
impl NyashInterpreter {