Different behaviour of reader for invalid token expression
jfacorro opened this issue · comments
Juan Facorro commented
Describe the bug
Entering the following expression in the REPL provides different results:
:{:a 1}
To Reproduce
In a clojerl REPL enter the following :{:a 1}
.
Expected behavior
Should behave in the same way as in Clojure JVM:
Clojure 1.10.0
user=> :{:a 1}
Syntax error reading source at (REPL:1:2).
Invalid token: :
{:a 1}
user=>
Actual behavior
Clojure 0.7.1-2136.4a5b16c
clje.user=> :{:a 1}
#error {
:type clojerl.Error
:message NO_SOURCE_FILE:1:2: Invalid token: :}
:a
1
clje.user=>
Context
clojerl
version (tag/sha):0.7.1-132-g4a5b16c
Juan Facorro commented
There are other input strings in the REPL that will not be read correctly:
1{}
:{}
#?(1{}
\1234{}
foo:{}
Basically any input that will generate an error and doesn't include whitespace between the last character that generates the error and the next expression.