1 fn read-cell in: (addr gap-buffer), out: (addr handle cell), trace: (addr trace) { 2 # TODO: we may be able to generate tokens lazily and drop this stream. 3 # Depends on how we implement indent-sensitivity and infix. 4 var tokens-storage: (stream cell 0x400) 5 var tokens/ecx: (addr stream cell) <- address tokens-storage 6 tokenize in, tokens, trace 7 var error?/eax: boolean <- has-errors? trace 8 compare error?, 0/false 9 { 10 break-if-= 11 return 12 } 13 # TODO: insert parens 14 # TODO: transform infix 15 parse-input tokens, out, trace 16 }