From 6dbf52812d26d89df29c990c886bb1043e6be59d Mon Sep 17 00:00:00 2001 From: "Sunrin SHIMURA (keen)" <3han5chou7@gmail.com> Date: Mon, 19 Jan 2015 06:02:39 +0000 Subject: [PATCH] better error messages against invalid use of auxiliary syntax --- extlib/benz/boot.c | 4 ++-- piclib/picrin/syntax-rules.scm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extlib/benz/boot.c b/extlib/benz/boot.c index 8918625c..324104c5 100644 --- a/extlib/benz/boot.c +++ b/extlib/benz/boot.c @@ -52,7 +52,7 @@ my $src = <<'EOL'; (list (r 'define-syntax) (cadr expr) (list (r 'lambda) '_ (list (r 'lambda) '_ - (list (r 'error) "invalid use of auxiliary syntax"))))))) + (list (r 'error) (list (r 'string-append) "invalid use of auxiliary syntax: '" (symbol->string (cadr expr)) "'")))))))) (define-auxiliary-syntax else) (define-auxiliary-syntax =>) @@ -452,7 +452,7 @@ const char pic_boot[] = " (list (r 'define-syntax) (cadr expr)\n" " (list (r 'lambda) '_\n" " (list (r 'lambda) '_\n" -" (list (r 'error) \"invalid use of auxiliary syntax\")))))))\n" +" (list (r 'error) (list (r 'string-append) \"invalid use of auxiliary syntax: '\" (symbol->string (cadr expr)) \"'\"))))))))\n" "\n" " (define-auxiliary-syntax else)\n" " (define-auxiliary-syntax =>)\n" diff --git a/piclib/picrin/syntax-rules.scm b/piclib/picrin/syntax-rules.scm index 8b444085..59d2b8e9 100644 --- a/piclib/picrin/syntax-rules.scm +++ b/piclib/picrin/syntax-rules.scm @@ -8,7 +8,7 @@ (list (r 'define-syntax) (cadr expr) (list (r 'lambda) '_ (list (r 'lambda) '_ - (list (r 'error) "invalid use of auxiliary syntax"))))))) + (list (r 'error) (list (r 'string-append) "invalid use of auxiliary syntax: '" (symbol->string (cadr expr)) "'")))))))) (define-auxiliary-syntax _) (define-auxiliary-syntax ...)