bit-not and unknown operator error
authorDavid Vázquez <davazp@gmail.com>
Wed, 19 Jun 2013 04:46:43 +0000 (06:46 +0200)
committerDavid Vázquez <davazp@gmail.com>
Wed, 19 Jun 2013 04:46:43 +0000 (06:46 +0200)
experimental/codegen.lisp

index 3b97c58..b623b53 100644 (file)
            (unary-op post++      "++"            1    right :lvalue t :post t)
            (unary-op post--      "--"            1    right :lvalue t :post t)
            (unary-op not         "!"             1    right)
+           (unary-op bit-not     "~"             1    right)
            (unary-op unary+      "+"             1    right)
            (unary-op unary-      "-"             1    right)
            (unary-op delete      "delete "       1    right)
                (js-operator "?")
                (js-expr (second args))
                (js-format ":")
-               (js-expr (third args))))))))))
+               (js-expr (third args)))
+             (return-from js-operator-expression))
+
+           (error "Unknown operator `~S'" op)))))))
 
 (defun js-expr (form)
   (let ((form (js-expand-expr form)))