feat: Major documentation reorganization and unified Box design updates
## Documentation & Organization - Moved copilot_issues.txt → 00_MASTER_ROADMAP.md (phases folder) - Created Phase 9.79b.1 & 9.79b.2 plans for unified Box implementation - Updated unified-box-design-deep-analysis.md with ChatGPT5 insights - Added P2P documentation and examples (ping-pong, self-ping) ## Code Updates - P2PBox: Reverted to original error state for demonstration - VM: Enhanced BoxCall dispatch for unified approach - Updated box factory, interpreter calls, and transport layer ## Cleanup & Privacy - Removed private/ and private_test/ from git tracking - Added private folders to .gitignore for security - Cleaned root directory: moved backups, removed temp files - Moved consultation files to docs/archive/consultations/ ## Other Improvements - Added object literal syntax improvement idea - Updated CLAUDE.md with master roadmap reference - Updated CURRENT_TASK.md with latest progress 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -229,6 +229,38 @@ impl NyashInterpreter {
|
||||
// オブジェクトを評価(通常のメソッド呼び出し)
|
||||
let obj_value = self.execute_expression(object)?;
|
||||
idebug!("🔍 DEBUG: execute_method_call - object type: {}, method: {}", obj_value.type_name(), method);
|
||||
|
||||
// 🌟 ユニバーサルメソッド前段ディスパッチ(非侵襲)
|
||||
// toString()/type()/equals(x)/clone() をトレイトに直結
|
||||
match method {
|
||||
"toString" => {
|
||||
if !arguments.is_empty() {
|
||||
return Err(RuntimeError::InvalidOperation { message: format!("toString() expects 0 arguments, got {}", arguments.len()) });
|
||||
}
|
||||
return Ok(Box::new(obj_value.to_string_box()));
|
||||
}
|
||||
"type" => {
|
||||
if !arguments.is_empty() {
|
||||
return Err(RuntimeError::InvalidOperation { message: format!("type() expects 0 arguments, got {}", arguments.len()) });
|
||||
}
|
||||
return Ok(Box::new(StringBox::new(obj_value.type_name())));
|
||||
}
|
||||
"equals" => {
|
||||
if arguments.len() != 1 {
|
||||
return Err(RuntimeError::InvalidOperation { message: format!("equals() expects 1 argument, got {}", arguments.len()) });
|
||||
}
|
||||
let rhs = self.execute_expression(&arguments[0])?;
|
||||
let eq = obj_value.equals(&*rhs);
|
||||
return Ok(Box::new(eq));
|
||||
}
|
||||
"clone" => {
|
||||
if !arguments.is_empty() {
|
||||
return Err(RuntimeError::InvalidOperation { message: format!("clone() expects 0 arguments, got {}", arguments.len()) });
|
||||
}
|
||||
return Ok(obj_value.clone_box());
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
||||
// Builtin dispatch (centralized)
|
||||
if let Some(res) = self.dispatch_builtin_method(&obj_value, method, arguments) {
|
||||
|
||||
Reference in New Issue
Block a user