mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Added comments
This commit is contained in:
parent
49f1d4b604
commit
da3d53340b
3 changed files with 15 additions and 6 deletions
6
Makefile
6
Makefile
|
@ -140,6 +140,12 @@ uninstall:
|
|||
$(RMDIR) $(DESTDIR)$(DATADIR)/scheme
|
||||
$(RMDIR) $(DESTDIR)$(DATADIR)
|
||||
|
||||
# This is an example of how to build/test changes to the compiler.
|
||||
# With the way everything is setup now, you need to rebuild the module(s),
|
||||
# install them, and then rebuild the compiler executable to run them.
|
||||
#
|
||||
# It may be possible to use dynamic linking to reduce some of this overhead
|
||||
# in the future (should really look into that!)
|
||||
trans:
|
||||
cyclone scheme/cyclone/transforms.sld && sudo cp scheme/cyclone/transforms.* /usr/local/share/cyclone/scheme/cyclone/ && cyclone cyclone.scm && sudo cp cyc lone /usr/local/bin
|
||||
# cyclone scheme/cyclone/transforms.sld
|
||||
|
|
|
@ -383,11 +383,13 @@
|
|||
((if? exp) (analyze-if exp))
|
||||
((lambda? exp) (analyze-lambda exp))
|
||||
;; Expand macros
|
||||
;; TODO: does not work below because car is a symbol ('or) and
|
||||
;; not the actual macro. so how to look it up???
|
||||
((and (pair? exp) (macro? (car exp)))
|
||||
;(write (list 'debug 'macro exp))
|
||||
(analyze (apply (car exp) (cdr exp))))
|
||||
; ((and (pair? exp) (symbol? (car exp)))
|
||||
;;; TODO: look up symbol in env, and expand if it is a macro
|
||||
; will need to pass env to analyze (ideally), and use same lookup
|
||||
; code as for analyze-variable. obviously this will introduce
|
||||
; some extra overhead into eval, which is not ideal. may need to
|
||||
; reduce that overhead later...
|
||||
; (analyze (apply (car exp) (cdr exp))))
|
||||
;; TODO: ideally, macro system would handle these next three
|
||||
((tagged-list? 'let exp)
|
||||
(let ((vars (map car (cadr exp))) ;(let->bindings exp)))
|
||||
|
|
|
@ -47,4 +47,5 @@
|
|||
(define x 1)
|
||||
(write x)
|
||||
(write
|
||||
(eval '(or 1 2 x)))
|
||||
(eval 'or))
|
||||
;(eval '(or 1 2 x)))
|
||||
|
|
Loading…
Add table
Reference in a new issue