mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-05 12:16:35 +02:00
Issue #246 - Very basic bracket support
This commit is contained in:
parent
03c254de14
commit
0282227d7a
1 changed files with 10 additions and 0 deletions
10
runtime.c
10
runtime.c
|
@ -6851,6 +6851,16 @@ void Cyc_io_read_token(void *data, object cont, object port)
|
||||||
}
|
}
|
||||||
} else if (c == '|' && !p->tok_end) {
|
} else if (c == '|' && !p->tok_end) {
|
||||||
_read_literal_identifier(data, p);
|
_read_literal_identifier(data, p);
|
||||||
|
} else if (c == '[' || c == '{') {
|
||||||
|
if (p->tok_end) _read_return_atom(data, cont, p);
|
||||||
|
// Special encoding so we can distinguish from chars such as #\(
|
||||||
|
make_c_opaque(opq, obj_char2obj('(')); // Cheap support for brackets
|
||||||
|
return_thread_runnable(data, &opq);
|
||||||
|
} else if (c == ']' || c == '}') {
|
||||||
|
if (p->tok_end) _read_return_atom(data, cont, p);
|
||||||
|
// Special encoding so we can distinguish from chars such as #\(
|
||||||
|
make_c_opaque(opq, obj_char2obj(')')); // Cheap support for brackets
|
||||||
|
return_thread_runnable(data, &opq);
|
||||||
} else {
|
} else {
|
||||||
// No special meaning, add char to current token (an atom)
|
// No special meaning, add char to current token (an atom)
|
||||||
_read_add_to_tok_buf(p, c);
|
_read_add_to_tok_buf(p, c);
|
||||||
|
|
Loading…
Add table
Reference in a new issue