From d3ec20aa037e9e593ec721e6ab7792b810775d8f Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 26 Feb 2021 22:11:12 -0800 Subject: 7814 --- baremetal/shell/read.mu | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'baremetal') diff --git a/baremetal/shell/read.mu b/baremetal/shell/read.mu index 9078f7c5..ec560e76 100644 --- a/baremetal/shell/read.mu +++ b/baremetal/shell/read.mu @@ -1,11 +1,15 @@ # out is not allocated -fn read-cell in: (addr gap-buffer), _out: (addr handle cell), trace: (addr trace) { +fn read-cell in: (addr gap-buffer), out: (addr handle cell), trace: (addr trace) { var tokens-storage: (stream cell 0x100) var tokens/ecx: (addr stream cell) <- address tokens-storage tokenize in, tokens, trace # TODO: insert parens # TODO: transform infix - # TODO: parse. For now we just convert first token into a symbol and return it. + parse-sexpression tokens, out, trace +} + +fn parse-sexpression tokens: (addr stream cell), _out: (addr handle cell), trace: (addr trace) { + # For now we just convert first token into a symbol and return it. TODO var empty?/eax: boolean <- stream-empty? tokens compare empty?, 0/false { -- cgit 1.4.1-2-gfad0 ref='/danisanti/profani-tty/refs/?id=d1ece21b5f581f39b97262e981a7d68e2a82f0bb'>refs log blame commit diff stats
path: root/README.md
blob: 64c9b1efe1bc474734054eafd52eb1cb8115ebe6 (plain) (tree)
1
2
3
4
5
6
7
8