-(defun code (&rest args)
- (mapconcat (lambda (arg)
- (cond
- ((null arg) "")
- ((integerp arg) (integer-to-string arg))
- ((floatp arg) (float-to-string arg))
- ((stringp arg) arg)
- (t
- (with-output-to-string (*standard-output*)
- (js-expr arg)))))
- args))
-
-;;; Concatenate the arguments and wrap them with a self-calling
-;;; Javascript anonymous function. It is used to make some Javascript
-;;; statements valid expressions and provide a private scope as well.
-;;; It could be defined as function, but we could do some
-;;; preprocessing in the future.
-(defmacro js!selfcall (&body body)
- ``(call (function nil (code ,,@body))))
-
-