code wiki / (root) / smoke_lex2.nx

smoke_lex2.nx source

↩ module page · 14 lines · 324 B

1// smoke_lex2.nx -- lex two tokens. 2 3import "syscalls.nx" 4import "lex_kinds.nx" 5import "lex.nx" 6 7func main() -> i64 { 8 let src: *u8 = "fn" 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}