add syntax-error

This commit is contained in:
Yuichi Nishiwaki 2013-12-10 03:21:29 -08:00
parent d1752bb236
commit 11b0796187
1 changed files with 9 additions and 6 deletions

View File

@ -227,6 +227,11 @@
(begin ,@(cdar clauses)) (begin ,@(cdar clauses))
,(loop (cdr clauses)))))))))) ,(loop (cdr clauses))))))))))
(define-syntax syntax-error
(er-macro-transformer
(lambda (expr rename compare)
(apply error (cdr expr)))))
(define-syntax define-auxiliary-syntax (define-syntax define-auxiliary-syntax
(er-macro-transformer (er-macro-transformer
(lambda (expr r c) (lambda (expr r c)
@ -246,9 +251,8 @@
quasiquote unquote unquote-splicing quasiquote unquote unquote-splicing
and or and or
cond case else => cond case else =>
do do when unless
when unless _ ... syntax-error))
_ ...))
(import (picrin macro) (import (picrin macro)
(picrin core-syntax)) (picrin core-syntax))
@ -257,9 +261,8 @@
quasiquote unquote unquote-splicing quasiquote unquote unquote-splicing
and or and or
cond case else => cond case else =>
do do when unless
when unless _ ... syntax-error)
_ ...)
(define (any pred list) (define (any pred list)
(if (null? list) (if (null? list)