code wiki / (root) / smoke_lex3.nx

smoke_lex3.nx source

↩ module page · 14 lines · 335 B

1// smoke_lex3.nx -- lex multiple tokens. 2 3import "syscalls.nx" 4import "lex_kinds.nx" 5import "lex.nx" 6 7func main() -> i64 { 8 let src: *u8 = "func a()" 9 let toks: *Tok = lex_source(src, 16) 10 if toks == (0 as *Tok) { 11 return __syscall(93, 1, 0, 0, 0, 0, 0) 12 } 13 return __syscall(93, 0, 0, 0, 0, 0, 0) 14}