nx_smoke_lex_min.nx source
↩ module page · 23 lines · 730 B
1// smoke_lex_min.nx -- minimal lex_source call.
2//
3// If this segfaults the bug is in lex.nx or its codegen interaction.
4// If this exits 0 the bug is something specific lex_test does after.
5
6// nx_safety_envelope:
7// intended_use: AUTO_APPLIED -- primitive-specific tuning queued
8// sil_target: SIL1
9// evidence: [bulk_applied_2026-05-16, see-file-comment-for-detail]
10// verdict: NOT_YET_EVALUATED
11
12import "nx_syscalls.nx"
13import "nx_lex_kinds.nx"
14import "nx_tokenizer.nx"
15
16func main() -> i64 {
17 let src: *u8 = "f"
18 let toks: *Tok = lex_source(src, 16)
19 if toks == (0 as *Tok) {
20 return __syscall(93, 1, 0, 0, 0, 0, 0)
21 }
22 return __syscall(93, 0, 0, 0, 0, 0, 0)
23}