mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-21 06:39:17 +02:00
Raising an error in do iterator clauses with more then 3 terms.
Provides a friendlier error for cases like issue #187.
This commit is contained in:
parent
f5d60050a5
commit
e0101944fd
1 changed files with 6 additions and 1 deletions
|
@ -284,7 +284,12 @@
|
|||
`(,(rename 'begin)
|
||||
,@(cdr (cddr expr))
|
||||
(,(rename 'lp)
|
||||
,@(map (lambda (x) (if (pair? (cddr x)) (car (cddr x)) (car x)))
|
||||
,@(map (lambda (x)
|
||||
(if (pair? (cddr x))
|
||||
(if (pair? (cdr (cddr x)))
|
||||
(error "too many forms in do iterator" x)
|
||||
(car (cddr x)))
|
||||
(car x)))
|
||||
(cadr expr)))))
|
||||
(check (car (cddr expr)))
|
||||
(wrap
|
||||
|
|
Loading…
Add table
Reference in a new issue