From 5ae77c6e872d18ca6afbf98b7ae94977f8738a3e Mon Sep 17 00:00:00 2001 From: Marco Baringer Date: Mon, 15 Aug 2005 07:49:02 +0000 Subject: [PATCH] Attempt to improve the conversion of (js ((lambda ...) ...)) --- js.lisp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/js.lisp b/js.lisp index 9b7bd29..039a5b2 100644 --- a/js.lisp +++ b/js.lisp @@ -525,15 +525,19 @@ this macro." (max-length (- 80 start-pos 2)) (args (dwim-join value-string-lists max-length :start "(" :end ")" :join-after ","))) - (dwim-join (typecase (f-function form) - (js-defun (list (list "(") - (js-to-strings (f-function form) (+ start-pos 2)) - (list ")") - args)) - (t (list (js-to-strings (f-function form) (+ start-pos 2)) - args))) - max-length - :separator ""))) + (etypecase (f-function form) + (js-lambda + (dwim-join (list (append (dwim-join (list (js-to-strings (f-function form) (+ start-pos 2))) + max-length + :start "(" :end ")" :separator "") + args)) + max-length + :separator "")) + ((or js-variable js-aref js-slot-value) + (dwim-join (list (js-to-strings (f-function form) (+ start-pos 2)) + args) + max-length + :separator ""))))) (defjsclass method-call (expression) ((method :initarg :method :accessor m-method) -- 2.20.1