[Bese-devel] next parenscript bug
Lou Vanek
vanek at acd.net
Tue Jul 11 17:06:33 UTC 2006
in js.lisp, 'default is never matched because 'val' is a class object,
not a plain value (at least on clisp 2.38). The result is that the
"default" switch statement is never printed.
(defmethod js-to-statement-strings ((case js-switch) start-pos)
(let ((body (mapcan #'(lambda (clause)
(let ((val (car clause))
(body (second clause)))
(dwim-join (list (if (eql val 'default)
(list "")
(js-to-strings val (+ start-pos 2)))
(js-to-statement-strings body (+ start-pos 2)))
(- 80 start-pos 2)
:start (if (eql val 'default) " default" " case ")
:white-space " "
:join-after ":"))) (case-clauses case))))
I would include my patch but it is kinda hackish... no, it
IS hackish and I'm sure others with more lisp experience than
me can come up with a better solution.
I think there's a similar problem in the macro directly
'above' this one, too.
Lou Vanek
More information about the bese-devel
mailing list