restore(lang): full lang tree from ff3ef452 (306 files) — compiler, vm, shared, runner, c-abi, etc.\n\n- Restores lang/ directory (files≈306, dirs≈64) as per historical branch with selfhost sources\n- Keeps our recent parser index changes in compiler/* (merged clean by checkout)\n- Unblocks selfhost development and documentation references

This commit is contained in:
nyash-codex
2025-10-31 20:45:46 +09:00
parent dbc285f2b1
commit e5f697eb22
244 changed files with 16915 additions and 47 deletions

View File

@ -37,9 +37,12 @@ box ExecutionPipelineBox {
if stage3_flag == 1 { p.stage3_enable(1) }
p.extract_usings(src)
local usings = p.get_usings_json()
// Extract extern_c annotations (syntax: @extern_c("c_symbol","Func/Arity");)
p.extract_externs(src)
local externs = p.get_externs_json()
local ast = p.parse_program2(src)
// Emit Stage1 JSON with meta.usings
local json = EmitterBox.emit_program(ast, usings)
local json = EmitterBox.emit_program(ast, usings, externs)
if json == null || json.size() == 0 { return 1 }
print(json)
return 0