Open Kalimehtar opened 4 years ago
In what situation did that nested list expression parse as (list 1 2 3 (list 4 . 5))
?
I'm having trouble reproducing that bug:
#lang sweet-exp racket
list 1 2 3
list 4 5
produces (list 1 2 3 (list 4 5))
as expected.
Delete last newline. If "5" is the last character of the file, then branch [(eof-object? rest) (cons new-level first)]
returns item, while a list is expected.
The precedence between $
sublist and \\
split is off. I thought something like
map $ lambda (x) {1 / x} \\ '(1 2 3)
was supposed to parse as
(map (lambda (x) (/ 1 x)))
'(1 2 3)
and not as
(map (lambda (x) (/ 1 x))
'(1 2 3))
Then raise block [(e1 ... (~and $ (~datum $)) e2 ...) ...]
before [(before ... (e1 (~literal \\) e2) after ...)
. It will switch the precedence.
I'm wrong. \\
processed (in my commit) first, so map $ lambda (x) {1 / x} \\ '(1 2 3)
is really
map $ lambda (x) {1 / x}
'(1 2 3)
Okay. This definitely needs some tests then.
There was a bug.
raised a error, because it was parsed as (list 1 2 3 (list 4 . 5)) Now it's fixed.
And now \ can be not only an empty head, but also can be used to split a list.
or