Something about all-numerics strings causes failure (?)
eraserhd opened this issue · 2 comments
eraserhd commented
The automata ["1"]
won't accept the input "1"
:
avi.repl=> (a/advance (a/compile [:1]) nil :1 :error)
#automat.core.CompiledAutomatonState{:accepted? true, :checkpoint nil, :state-index 1, :start-index 0, :stream-index 1, :value nil}
avi.repl=> (a/advance (a/compile ["1"]) nil "1" :error)
ClassCastException java.lang.String cannot be cast to java.lang.Number automat.stream/to-stream/reify--20992 (stream.clj:70)
avi.repl=> (a/advance (a/compile ["x1"]) nil "x1" :error)
#automat.core.CompiledAutomatonState{:accepted? true, :checkpoint nil, :state-index 1, :start-index 0, :stream-index 1, :value nil}
avi.repl=>
eraserhd commented
This is Clojure, not ClojureScript (it does seem like a JavaScript coersion, doesn't it?).
eraserhd commented
Just discovered that this works in 0.2.0-alpha2.