HCoop
/
clinton
/
parenscript.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
356992f
)
Fixed AREF when an expression is passed as the array.
author
Travis Cross
<tc@traviscross.com>
Fri, 22 Aug 2008 07:07:07 +0000
(07:07 +0000)
committer
Travis Cross
<tc@traviscross.com>
Fri, 22 Aug 2008 07:07:07 +0000
(07:07 +0000)
(aref (or a b c) 0) now works.
Thanks to Daniel Gackle for the bug report.
src/printer.lisp
patch
|
blob
|
blame
|
history
diff --git
a/src/printer.lisp
b/src/printer.lisp
index
9ab4e28
..
7f57aea
100644
(file)
--- a/
src/printer.lisp
+++ b/
src/printer.lisp
@@
-144,7
+144,9
@@
vice-versa.")
(psw #\[) (print-comma-delimited-list initial-contents) (psw #\]))
(defprinter js-aref (array indices)
- (ps-print array)
+ (if (>= (expression-precedence array) #.(expression-precedence '(operator js-aref)))
+ (parenthesize-print array)
+ (ps-print array))
(loop for idx in indices do
(psw #\[) (ps-print idx) (psw #\])))