mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-12 15:27:36 +02:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
6be7a259ff
2 changed files with 14 additions and 0 deletions
|
@ -2,6 +2,10 @@
|
|||
|
||||
## 0.7.3 - TBD
|
||||
|
||||
Features
|
||||
|
||||
- Added basic support for square and curly brackets in place of parentheses.
|
||||
|
||||
Bug Fixes
|
||||
|
||||
- Fixed an off-by-one error in `read-line` where the function erroneously reported an extra character was read from `stdin`. Thanks to wasamasa for the bug report.
|
||||
|
|
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) {
|
||||
_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 {
|
||||
// No special meaning, add char to current token (an atom)
|
||||
_read_add_to_tok_buf(p, c);
|
||||
|
|
Loading…
Add table
Reference in a new issue