1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-24 20:30:28 +02:00

*** empty log message ***

This commit is contained in:
Keisuke Nishida 2001-04-16 03:43:48 +00:00
parent 78591ef5c3
commit 8f5cfc810f
41 changed files with 681 additions and 529 deletions

View file

@ -36,6 +36,9 @@
;;; Translator
;;;
(define scheme-primitives
'(not null? eq? eqv? equal? pair? list? cons car cdr set-car! set-cdr!))
(define (trans e l x)
(cond ((pair? x)
(let ((y (macroexpand x)))
@ -216,15 +219,17 @@
(() (make:void))
((('else . body)) (trans:pair `(begin ,@body)))
(((((? symbol? key) ...) body ...) rest ...)
(if (memq 'compile key)
(primitive-eval `(begin ,@(copy-tree body))))
(if (memq 'load-toplevel key)
(trans:pair `(begin ,@body))
(begin
(primitive-eval `(begin ,@(copy-tree body)))
(trans:pair `(begin ,@body)))
(loop rest)))
(else (bad-syntax)))))
(else
(make-<ghil-call> e l (trans:x head) (map trans:x tail)))))
(if (memq head scheme-primitives)
(make-<ghil-inline> e l head (map trans:x tail))
(make-<ghil-call> e l (trans:x head) (map trans:x tail))))))
(define (trans-quasiquote e l x)
(cond ((not (pair? x)) x)