code wiki / _hdl_build / nx_eng_badsrc.nx

nx_eng_badsrc.nx source

↩ module page · 8 lines · 385 B

1// nx_eng_badsrc.nx -- a source that FAILS to compile (reserved keyword as a name). 2// Exactly the bug that produced the empty .s -> garbage binary -> SIGSEGV. The 3// Engineer's eng_compile must catch this BEFORE it ever becomes a crash. 4import "nx_syscalls.nx" 5func main() -> i64 { 6 var match: i64 = 1 // 'match' is reserved -> nx_parse loud-fails (rc != 0) 7 return match 8}