mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-06 15:40:29 +02:00
Add R6RS `syntax-violation' to (rnrs syntax-case).
* module/rnrs/6/exceptions.scm: Remove dependency on (rnrs syntax-case); rewrite guard and guard0 in using syntax-rules in terms of syntax-case. * module/rnrs/6/syntax-case.scm: Add syntax-violation implementation.
This commit is contained in:
parent
2359a9a49e
commit
0c7398a7dc
2 changed files with 26 additions and 19 deletions
|
@ -50,6 +50,18 @@
|
|||
|
||||
quasisyntax
|
||||
unsyntax
|
||||
unsyntax-splicing
|
||||
unsyntax-splicing)
|
||||
(ice-9 optargs)
|
||||
(rnrs base (6))
|
||||
(rnrs conditions (6))
|
||||
(rnrs exceptions (6))
|
||||
(rnrs records procedural (6)))
|
||||
|
||||
syntax-violation)))
|
||||
(define* (syntax-violation who message form #:optional subform)
|
||||
(let* ((conditions (list (make-message-condition message)
|
||||
(make-syntax-violation form subform)))
|
||||
(conditions (if who
|
||||
(cons (make-who-condition who) conditions)
|
||||
conditions)))
|
||||
(raise (apply condition conditions))))
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue