mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-02-05 15:10:40 -08:00
loop: barf on nonconformant loop detection
The specification says that the simple loop is determined when all forms are compound. Fixes #748.
This commit is contained in:
parent
1a0aa0a52e
commit
f0147072a2
1 changed files with 5 additions and 2 deletions
|
|
@ -1932,8 +1932,11 @@ Note that this is not a valid ANSI code."))
|
|||
|
||||
(defun loop-standard-expansion (keywords-and-forms environment universe)
|
||||
(declare (si::c-local))
|
||||
(if (and keywords-and-forms (symbolp (car keywords-and-forms)))
|
||||
(loop-translate keywords-and-forms environment universe)
|
||||
(if (some #'atom keywords-and-forms)
|
||||
(if (symbolp (car keywords-and-forms))
|
||||
(loop-translate keywords-and-forms environment universe)
|
||||
(error "LOOP: The first form ~S is not an extended loop keyword."
|
||||
(car keywords-and-forms)))
|
||||
(let ((tag (gensym)))
|
||||
`(block nil (tagbody ,tag (progn ,@keywords-and-forms) (go ,tag))))))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue