Files
hakorune/tools
nyash-codex 8c4d63bfbb feat(phase-21.8): extract using imports in hakorune_emit_mir.sh (Step 7 part 2)
Complete imports pipeline by extracting using statements and passing to MirBuilder:
- Extract "using X as Y" from source file using grep/sed
- Build JSON map {"Y":"Y"} for all imports
- Set HAKO_MIRBUILDER_IMPORTS environment variable
- extern_provider reads this and passes to program_json_to_mir_json_with_imports()
- MapVars::resolve() recognizes MatI64 as valid static box reference

Test result:
 /tmp/test_imports.hako (using MatI64) → MIR JSON generated without errors
 No "undefined variable: MatI64" error
 boxcall with MatI64.new() properly resolved

Phase 21.8 Step 7 complete - imports pipeline fully functional!

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 16:39:40 +09:00
..