add reader support for #; #` #' #, and #,@. fix bug in compile-and-load.

* libguile/read.c (flush_ws, scm_read_commented_expression)
  (scm_read_sharp): Add support for commenting out expressions with #;.
  (scm_read_syntax, scm_read_sharp): Add support for #', #`, #, and #,@.

* module/ice-9/boot-9.scm: Remove #' read-hash extension, which actually
  didn't do anything at all. It's been there since 1997, but no Guile
  code I've ever seen uses it, and it conflicts with #'x => (syntax x)
  from modern Scheme.

* module/system/base/compile.scm (compile-and-load): Whoops, fix a number
  of bugs here.
This commit is contained in:
Andy Wingo 2009-05-28 14:49:33 +02:00
commit 34f3d47df9
3 changed files with 86 additions and 6 deletions

View file

@ -107,9 +107,9 @@
port)))
comp))
(define* (compile-and-load file #:key (to 'value) (opts '()))
(read-and-compile (open-input-port file)
#:from lang #:to to #:opts opts))
(define* (compile-and-load file #:key (from 'scheme) (to 'value) (opts '()))
(read-and-compile (open-input-file file)
#:from from #:to to #:opts opts))
(define (compiled-file-name file)
(let ((base (basename file))