mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-24 20:45:06 +02:00
Fixes
This commit is contained in:
parent
694f9f6266
commit
3ec2558a6f
1 changed files with 8 additions and 8 deletions
16
cyclone.scm
16
cyclone.scm
|
@ -29,13 +29,13 @@
|
||||||
(tagged-list? 'define-library ast))
|
(tagged-list? 'define-library ast))
|
||||||
(define (lib:name ast) (cadr ast))
|
(define (lib:name ast) (cadr ast))
|
||||||
(define (lib:exports ast)
|
(define (lib:exports ast)
|
||||||
(and-let* ((code (assoc 'export (cddr l))))
|
(and-let* ((code (assoc 'export (cddr ast))))
|
||||||
(cdr code)))
|
(cdr code)))
|
||||||
(define (lib:imports ast)
|
(define (lib:imports ast)
|
||||||
(and-let* ((code (assoc 'import (cddr l))))
|
(and-let* ((code (assoc 'import (cddr ast))))
|
||||||
(cdr code)))
|
(cdr code)))
|
||||||
(define (lib:body ast)
|
(define (lib:body ast)
|
||||||
(and-let* ((code (assoc 'begin (cddr l))))
|
(and-let* ((code (assoc 'begin (cddr ast))))
|
||||||
(cdr code)))
|
(cdr code)))
|
||||||
;; TODO: include, include-ci, cond-expand
|
;; TODO: include, include-ci, cond-expand
|
||||||
|
|
||||||
|
@ -58,14 +58,14 @@
|
||||||
(trace:info input-program) ;pretty-print
|
(trace:info input-program) ;pretty-print
|
||||||
|
|
||||||
(cond
|
(cond
|
||||||
((library? input-program)
|
((library? (car input-program))
|
||||||
(set! program? #f)
|
(set! program? #f)
|
||||||
(set! lib-exports (lib:exports input-program))
|
(set! lib-exports (lib:exports (car input-program)))
|
||||||
(set! lib-imports (lib:imports input-program))
|
(set! lib-imports (lib:imports (car input-program)))
|
||||||
(set! input-program (lib:body input-program))
|
(set! input-program (lib:body (car input-program)))
|
||||||
(error "TODO: I do not know how to compile a library"))
|
(error "TODO: I do not know how to compile a library"))
|
||||||
(else
|
(else
|
||||||
(error "DEBUG: not a library")))
|
(error "DEBUG: not a library" input-program)))
|
||||||
|
|
||||||
;; TODO: how to handle stdlib when compiling a library??
|
;; TODO: how to handle stdlib when compiling a library??
|
||||||
(set! input-program (add-libs input-program))
|
(set! input-program (add-libs input-program))
|
||||||
|
|
Loading…
Add table
Reference in a new issue