nx_smoke_lex6.nx source
↩ module page · 21 lines · 733 B
1// smoke_lex6.nx -- lex + read first tok kind.
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_lex_kinds.nx"
11import "nx_tokenizer.nx"
12
13func main() -> i64 {
14 let src: *u8 = "func add(a: i64, b: i64) -> i64 { return a + b }"
15 let toks: *Tok = lex_source(src, 256)
16 if toks == (0 as *Tok) { return __syscall(93, 1, 0, 0, 0, 0, 0) }
17 let t_base: i64 = toks as i64
18 let t0: *Tok = (t_base + 0 * TOK_BYTES) as *Tok
19 let k: i64 = t0.kind
20 return __syscall(93, k, 0, 0, 0, 0, 0)
21}