about summary refs log blame commit diff stats
path: root/shell/read.mu
blob: 191dd821d3fe38e5a4062cf976ae99cb71bcb01d (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                                                                                  
                                         

                                                              





                                              

                         
                                
 
fn read-cell in: (addr gap-buffer), out: (addr handle cell), trace: (addr trace) {
  var tokens-storage: (stream cell 0x400)
  var tokens/ecx: (addr stream cell) <- address tokens-storage
  tokenize in, tokens, trace
  var error?/eax: boolean <- has-errors? trace
  compare error?, 0/false
  {
    break-if-=
    return
  }
  # TODO: insert parens
  # TODO: transform infix
  parse-input tokens, out, trace
}