From d6d321859dc629c6b96855f936c413102826e85b Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Fri, 11 Aug 2017 19:31:35 -0400 Subject: [PATCH] WIP --- runtime.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/runtime.c b/runtime.c index c1c9599f..cb575194 100644 --- a/runtime.c +++ b/runtime.c @@ -5755,7 +5755,20 @@ void Cyc_io_read_token(void *data, object cont, object port) p->line_num++; } else if (isspace(c)) { _read_whitespace(p); + } else if (c == '(' || c == ')' || c == '\'' || c == ',') { + // TODO: if buffer is not empty, return that instead, otherwise return this: + return_closcall1(data, cont, obj_char2obj(c)); + + // TODO: " (string) + // TODO: # + // TODO: | (literal identifier) } else { + // TODO: no, need to read chars into a new buffer. can be part of mem_buf with a + // starting idx, except: + // - if a read is needed + // - if token length exceeds mem_buf length + // will need to figure something out, maybe copy out to another malloc'd buffer + // in those cases _read_error(data, p, "Unhandled input sequence"); }