Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #244 from picrin-scheme/better-error-message
Browse files Browse the repository at this point in the history
better error messages against invalid use of auxiliary syntax
  • Loading branch information
nyuichi committed Jan 19, 2015
2 parents 5e3bd1e + 6dbf528 commit 9d2ed44
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions extlib/benz/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 =>)
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion piclib/picrin/syntax-rules.scm
Original file line number Diff line number Diff line change
Expand Up @@ -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 ...)
Expand Down

0 comments on commit 9d2ed44

Please sign in to comment.