code wiki / (root) / nx_smoke_nxc_pipeline4.nx

nx_smoke_nxc_pipeline4.nx source

↩ module page · 27 lines · 851 B

1// Try simpler source: no __syscall, just a constant return. 2 3// nx_safety_envelope: 4// intended_use: AUTO_APPLIED -- primitive-specific tuning queued 5// sil_target: SIL1 6// evidence: [bulk_applied_2026-05-16, see-file-comment-for-detail] 7// verdict: NOT_YET_EVALUATED 8 9import "nx_syscalls.nx" 10import "nx_types.nx" 11import "nx_lex_kinds.nx" 12import "nx_outbuf.nx" 13import "nx_ir.nx" 14import "nx_tokenizer.nx" 15import "nx_parse.nx" 16 17func main() -> i64 { 18 let demo: *u8 = "func main() -> i64 { return 42 }" 19 20 let toks: *Tok = lex_source(demo, 4096) 21 if toks == (0 as *Tok) { return __syscall(93, 1, 0, 0, 0, 0, 0) } 22 23 let m: *Module = parse_module(toks, 0 as *Module) 24 if m == (0 as *Module) { return __syscall(93, 2, 0, 0, 0, 0, 0) } 25 26 return __syscall(93, m.n_functions & 0xFF, 0, 0, 0, 0, 0) 27}