mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Handle datum comments
This commit is contained in:
parent
a125e1add6
commit
a492ea820c
2 changed files with 7 additions and 2 deletions
3
read.scm
3
read.scm
|
@ -777,6 +777,9 @@
|
|||
(list 'unquote (parse2 fp)))
|
||||
((eq? token (string->symbol ",@"))
|
||||
(list 'unquote-splicing (parse2 fp)))
|
||||
((eq? token (string->symbol "#;"))
|
||||
(parse2 fp) ;; Ignore next datum
|
||||
(parse2 fp))
|
||||
;; Other special cases?
|
||||
(else
|
||||
token))))
|
||||
|
|
|
@ -5995,10 +5995,12 @@ void Cyc_io_read_token(void *data, object cont, object port)
|
|||
_read_next_char(data, cont, p); // Fill buffer
|
||||
c = p->mem_buf[p->buf_idx++];
|
||||
p->col_num++;
|
||||
// TODO: block comment
|
||||
if (c == '|') {
|
||||
if (c == '|') { // Block comment
|
||||
_read_multiline_comment(p);
|
||||
continue;
|
||||
} else if (c == ';') { // Datum comment
|
||||
object sym = find_or_add_symbol("#;");
|
||||
return_thread_runnable(data, sym);
|
||||
} else if (c == 't') {
|
||||
if ((p->mem_buf_len - p->buf_idx) >= 3 &&
|
||||
p->mem_buf[p->buf_idx + 0] == 'r' &&
|
||||
|
|
Loading…
Add table
Reference in a new issue