mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 22:10:21 +02:00
* syncase.scm (guile-macro): Strip syntactic information from
expression before trying to treat it as a Guile macro call. (Thanks to Kevin Ryde.)
This commit is contained in:
parent
c2950e36ef
commit
e963ac2c54
3 changed files with 23 additions and 15 deletions
1
THANKS
1
THANKS
|
@ -38,6 +38,7 @@ For fixes or providing information which led to a fix:
|
|||
Ron Peterson
|
||||
David Pirotte
|
||||
Ken Raeburn
|
||||
Kevin Ryde
|
||||
Bill Schottstaedt
|
||||
Greg Troxel
|
||||
Momchil Velikov
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
2003-01-27 Mikael Djurfeldt <djurfeldt@nada.kth.se>
|
||||
|
||||
* syncase.scm (guile-macro): Strip syntactic information from
|
||||
expression before trying to treat it as a Guile macro call.
|
||||
(Thanks to Kevin Ryde.)
|
||||
|
||||
2003-01-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
|
||||
|
||||
* threads.scm (parallel, letpar): Rewritten.
|
||||
|
|
|
@ -157,21 +157,22 @@
|
|||
(define guile-macro
|
||||
(cons 'external-macro
|
||||
(lambda (e r w s)
|
||||
(if (symbol? e)
|
||||
;; pass the expression through
|
||||
e
|
||||
(let* ((eval-closure (fluid-ref expansion-eval-closure))
|
||||
(m (variable-ref (eval-closure (car e) #f))))
|
||||
(if (eq? (macro-type m) 'syntax)
|
||||
;; pass the expression through
|
||||
e
|
||||
;; perform Guile macro transform
|
||||
(let ((e ((macro-transformer m)
|
||||
e
|
||||
(append r (list eval-closure)))))
|
||||
(if (null? r)
|
||||
(sc-expand e)
|
||||
(sc-chi e r w)))))))))
|
||||
(let ((e (syntax-object->datum e)))
|
||||
(if (symbol? e)
|
||||
;; pass the expression through
|
||||
e
|
||||
(let* ((eval-closure (fluid-ref expansion-eval-closure))
|
||||
(m (variable-ref (eval-closure (car e) #f))))
|
||||
(if (eq? (macro-type m) 'syntax)
|
||||
;; pass the expression through
|
||||
e
|
||||
;; perform Guile macro transform
|
||||
(let ((e ((macro-transformer m)
|
||||
e
|
||||
(append r (list eval-closure)))))
|
||||
(if (null? r)
|
||||
(sc-expand e)
|
||||
(sc-chi e r w))))))))))
|
||||
|
||||
(define generated-symbols (make-weak-key-hash-table 1019))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue