Support 'throw' statement
[jscl.git] / src / compiler-codegen.lisp
index 1eabe21..5b8d028 100644 (file)
               (js-expr condition)
               (js-format ")")
               (js-stmt `(group ,@body))))
+        (throw
+            (destructuring-bind (object) (cdr form)
+              (js-format "throw ")
+              (js-expr object)
+              (js-format ";")))
         (t
          (js-expr form)
          (js-format ";")))))