lips
lips copied to clipboard
Parsing of recursive array literals
This code:
(write '(1 2 #0=#(1 2 #0#)))
Prints:
(1 2 #(1 2 #<DatumReference>))
On the first type it threw an error about expecting parenthesis but #<eof> found. I was not able to repeat this error.
DatumReference is an internal value of the parser, and it should never be exposed.
This is problematic, because the parser need to mutate the array in order to add self reference. But the & and # syntax extensions use freeze on the array/object to prevent mutation.
Let's remove the immutability from the array and objects literals. Proper recursive reference is more important.