about summary refs log tree commit diff stats
path: root/baremetal/shell
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-02-26 22:11:12 -0800
committerKartik K. Agaram <vc@akkartik.com>2021-02-26 22:11:12 -0800
commitd3ec20aa037e9e593ec721e6ab7792b810775d8f (patch)
tree94f91c9cbd59f13a8a7bc82fb6aea9d2979c1d65 /baremetal/shell
parent4d0fd93cb07d928dc7d9eb8e215cd8a033f9feb8 (diff)
downloadmu-d3ec20aa037e9e593ec721e6ab7792b810775d8f.tar.gz
7814
Diffstat (limited to 'baremetal/shell')
-rw-r--r--baremetal/shell/read.mu8
1 files changed, 6 insertions, 2 deletions
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
   {