Files
hakorune/apps/selfhost/vm/collect_empty_args_using_smoke.nyash
Selfhosting Dev 39f27a348a Phase 15: using system BOX parser problem completely resolved
 Major breakthroughs in using system stability:
- Fixed using system brace balance issue with NYASH_RESOLVE_FIX_BRACES=1
- Confirmed ChatGPT's JSON processing unification approach is correct
- Added comprehensive trace debugging for collect_prints method
- Identified collect_prints abnormal termination issue (method executes normally but return trace missing)

🔧 Technical improvements:
- Enhanced trace logging with method entry, loop exit, break conditions
- Documented using system file integration mechanism
- Validated echo/itoa processing works correctly with empty arguments

🎯 Phase 15 progress:
- Main using system parser errors:  RESOLVED
- collect_prints processing:  Functional (echo/itoa working)
- Remaining: investigate return value handling anomaly

Next: Codex investigation of collect_prints return behavior

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-23 04:10:00 +09:00

15 lines
527 B
Plaintext

using selfhost.vm.boxes.mini_vm_core as MiniVm
static box Main {
main(args) {
local json = "{\"kind\":\"Program\",\"statements\":[{\"kind\":\"Print\",\"expression\":{\"kind\":\"FunctionCall\",\"name\":\"echo\",\"arguments\":[]}},{\"kind\":\"Print\",\"expression\":{\"kind\":\"FunctionCall\",\"name\":\"itoa\",\"arguments\":[]}}]}"
local arr = new MiniVm().collect_prints(json)
print("DEBUG: arr.size=" + arr.size())
local i = 0
loop (i < arr.size()) { print(arr.get(i)) i = i + 1 }
return 0
}
}