Closed aengelberg closed 9 years ago
Thanks! This may shed a little light on the newline issue. https://github.com/bhauman/lein-figwheel/issues/100 and https://github.com/clojure/clojurescript/commit/fe28e87a960620386494045044f6b76e0374f1bb
It may just be that we need to bump the Clojurescript dependency and things will work better (see #6 for tracking on this issue).
I think this is fixed by bumping all the dependencies. In a rhino cljsbuild repl, I now get the following error:
cljs.user=> (insta/parser "S") org.mozilla.javascript.JavaScriptException: Error parsing grammar specification: Parse error at line 1 , column 2 :
S
^
Expected one of:
"="
"::="
":="
":"
"(*"
(.cljs_rhino_repl/goog/../instaparse/cfg.js#335)
instaparse$cfg$build_parser (.cljs_rhino_repl/instaparse/cfg.cljs:244:7)
(.cljs_rhino_repl/instaparse/core.cljs:170:9)
(.cljs_rhino_repl/instaparse/core.cljs:170:9)
(.cljs_rhino_repl/instaparse/core.cljs:149:4)
(NO_SOURCE_FILE <cljs repl>:1:0)
(NO_SOURCE_FILE <cljs repl>:1:0)
IPrintWithWriter
was not implemented yet on the Failure record, and there was also a stray java class in the instaparse.failure namespace.After this patch, in a Figwheel REPL I get this when there is an error in the input to a parser:
But I get this when there is a parse error in a grammar:
which isn't especially pretty. I'm not sure if this is just a limitation of the REPL specifically (what happens when it catches a string being thrown), or whether we should rethink how to report these multi-line failures on the cljs end. Any thoughts on that?