As CODE and codegen have to live together for a while, we can't deal
with the precedence/associativity easily. We use parenthesis in every
expression around ls-compile not to break the REPL.
" *newline*)
";" ,*newline*))))
-(defun ls-compile (sexp &optional multiple-value-p)
+(defun ls-compile* (sexp &optional multiple-value-p)
(multiple-value-bind (sexp expandedp) (!macroexpand-1 sexp)
(when expandedp
- (return-from ls-compile (ls-compile sexp multiple-value-p)))
+ (return-from ls-compile* (ls-compile sexp multiple-value-p)))
;; The expression has been macroexpanded. Now compile it!
(let ((*multiple-value-p* multiple-value-p))
(cond
(t
(error "How should I compile `~S'?" sexp))))))
+(defun ls-compile (sexp &optional multiple-value-p)
+ `(code "(" ,(ls-compile* sexp multiple-value-p) ")"))
+
(defvar *compile-print-toplevels* nil)