Support 'throw' statement
authorDavid Vázquez <davazp@gmail.com>
Thu, 20 Jun 2013 13:31:26 +0000 (15:31 +0200)
committerDavid Vázquez <davazp@gmail.com>
Thu, 20 Jun 2013 13:31:54 +0000 (15:31 +0200)
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 ";")))))