mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 11:50:28 +02:00
bug#71304: [PATCH] Add support for 'else' clause in R7RS cond-expand.
* module/ice-9/r7rs-libraries.scm (define-library) <handle-cond-expand>: Add a pattern to match an 'else' clause. Series-to: bug-guile@gnu.org
This commit is contained in:
parent
b2cc237a02
commit
522f368719
1 changed files with 3 additions and 1 deletions
|
@ -64,8 +64,10 @@
|
||||||
;; FIXME: R7RS (features) isn't quite the same as
|
;; FIXME: R7RS (features) isn't quite the same as
|
||||||
;; %cond-expand-features; see scheme/base.scm.
|
;; %cond-expand-features; see scheme/base.scm.
|
||||||
(memq (syntax->datum #'id) %cond-expand-features))))
|
(memq (syntax->datum #'id) %cond-expand-features))))
|
||||||
(syntax-case clauses ()
|
(syntax-case clauses (else)
|
||||||
(() #'()) ; R7RS says this is not specified :-/
|
(() #'()) ; R7RS says this is not specified :-/
|
||||||
|
(((else decl ...))
|
||||||
|
#'(decl ...))
|
||||||
(((test decl ...) . clauses)
|
(((test decl ...) . clauses)
|
||||||
(if (has-req? #'test)
|
(if (has-req? #'test)
|
||||||
#'(decl ...)
|
#'(decl ...)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue