klipse icon indicating copy to clipboard operation
klipse copied to clipboard

Comments evaluate to nil

Open pesterhazy opened this issue 7 years ago • 1 comments

(+ 3 4) ;; foo

Expected: snippet evaluates to 7.

Actual: snippet evaluates to nil.

This occurs frequently when klipsifying clojuredocs snippets such as https://clojuredocs.org/clojure.core/map

pesterhazy avatar Feb 11 '17 22:02 pesterhazy

The solution is to read and check the expression before evaluating it.

in core-eval of https://github.com/viebel/klipse/blob/master/src/klipse/lang/clojure.cljs

Something like: if the expression is not nil but it is read as nil then skip it

viebel avatar Feb 11 '17 22:02 viebel