js-slot-value printer now handles generic operators passed as the object.
authorTravis Cross <tc@traviscross.com>
Fri, 22 Aug 2008 13:39:52 +0000 (13:39 +0000)
committerTravis Cross <tc@traviscross.com>
Fri, 22 Aug 2008 13:39:52 +0000 (13:39 +0000)
(slot-value (or a b c) 'd) now works correctly.

src/printer.lisp

index 37213e1..5bc3639 100644 (file)
@@ -245,7 +245,7 @@ vice-versa.")
   (psw " }"))
 
 (defprinter js-slot-value (obj slot)
-  (if (and (listp obj) (member (car obj) '(js-expression-if)))
+  (if (>= (expression-precedence obj) #.(op-precedence 'js-slot-value))
       (parenthesize-print obj)
       (ps-print obj))
   (if (and (listp slot) (eql 'ps-quote (car slot)))