Fix bug in while
This commit is contained in:
parent
0ef7649346
commit
4db245c00d
|
@ -9,11 +9,11 @@
|
||||||
(require (for-syntax syntax/parse))
|
(require (for-syntax syntax/parse))
|
||||||
(define-syntax (while stx)
|
(define-syntax (while stx)
|
||||||
(syntax-parse stx
|
(syntax-parse stx
|
||||||
[(_while test-expr body ...)
|
[(_while test body ...)
|
||||||
#'(let loop ()
|
#'(let loop ()
|
||||||
(when test
|
(when test
|
||||||
body ...
|
body ...
|
||||||
(loop)))]
|
(loop)))]
|
||||||
[_
|
[_
|
||||||
(raise-syntax-error
|
(raise-syntax-error
|
||||||
#f "(while test-expr body ...) expected, got:" stx)]))
|
#f "(while test-expr body ...) expected, got:" stx)]))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user