✅ Phase 3 complete: DateTimeBox fully implemented and tested
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
This commit is contained in:
@ -11,6 +11,7 @@
|
||||
|
||||
use super::*;
|
||||
use crate::box_trait::StringBox;
|
||||
use crate::boxes::{TimeBox, DateTimeBox};
|
||||
|
||||
impl NyashInterpreter {
|
||||
/// TimeBoxのメソッド呼び出しを実行
|
||||
@ -171,6 +172,14 @@ impl NyashInterpreter {
|
||||
}
|
||||
Ok(datetime_box.addHours(arg_values[0].clone_box()))
|
||||
}
|
||||
"toString" => {
|
||||
if !arg_values.is_empty() {
|
||||
return Err(RuntimeError::InvalidOperation {
|
||||
message: format!("toString() expects 0 arguments, got {}", arg_values.len()),
|
||||
});
|
||||
}
|
||||
Ok(Box::new(datetime_box.to_string_box()))
|
||||
}
|
||||
_ => {
|
||||
Err(RuntimeError::InvalidOperation {
|
||||
message: format!("Unknown DateTimeBox method: {}", method),
|
||||
|
||||
Reference in New Issue
Block a user