Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

typeof operator

  • Loading branch information...
commit c499b1bc23a11799ffe119d8a974729c6936c4ad 1 parent 169e879
@ujihisa authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 runtime.clj
View
6 runtime.clj
@@ -65,6 +65,12 @@
(run- (:body func) (merge env applied-params)))
(fn? func) (func args)
:else (prn 'must-not-happen 'missing-function func)))
+ typeof (let [x (first cdr)]
+ (if (= clojure.lang.Symbol (type x))
+ (if-let [x (get env x)]
+ (js-type (evaluate x env))
+ 'undefined)
+ (js-type (evaluate x env))))
quote (get env (first cdr) 'missing-local-var)
expr))
expr))
Please sign in to comment.
Something went wrong with that request. Please try again.