On Sat, 5 Sep 2009, Tobias C. Rittweiler wrote:
> %DEFINE-COMPONENT-INLINE-METHODS contains the following LOOP form:
>
> (loop for data = rest then (cddr data)
> while data
> for key = (first data)
> for value = (second data)
> ...)
>
> However, if you look at LOOP's BNF in the specification, you'll see that
> termination clauses *must* appear after :for clauses.
The obvious transform is to move WHILE down and condition the FORs.
(loop for name in +asdf-methods+ do
(let ((keyword (intern (symbol-name name) :keyword)))
(loop for data = rest then (cddr data)
for key = (and data (first data))
for value = (and data (second data))
while data
when (eq key keyword) do
(destructuring-bind (op qual (o c) &body body) value
The FOR conditions can then be dropped since (nth n nil) = nil
(loop for name in +asdf-methods+ do
(let ((keyword (intern (symbol-name name) :keyword)))
(loop for data = rest then (cddr data)
for key = (first data)
for value = (second data)
while data
when (eq key keyword) do
(destructuring-bind (op qual (o c) &body body) value
Thus this can be fixed by simply moving the WHILE down two lines.
- Daniel
_______________________________________________
asdf-devel mailing list
[email protected]
http://common-lisp.net/cgi-bin/mailman/listinfo/asdf-devel