mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-14 08:17:35 +02:00
Recursive processing for lib:import->library-name
This commit is contained in:
parent
0b4bb36ec0
commit
f2ec269573
1 changed files with 7 additions and 1 deletions
|
@ -77,7 +77,8 @@
|
||||||
(tagged-list? 'except import)
|
(tagged-list? 'except import)
|
||||||
(tagged-list? 'prefix import)
|
(tagged-list? 'prefix import)
|
||||||
(tagged-list? 'rename import))
|
(tagged-list? 'rename import))
|
||||||
(cadr import))
|
(lib:import->library-name
|
||||||
|
(cadr import)))
|
||||||
(else
|
(else
|
||||||
import)))
|
import)))
|
||||||
|
|
||||||
|
@ -228,6 +229,8 @@
|
||||||
(exports (lib:exports (car lib))))
|
(exports (lib:exports (car lib))))
|
||||||
(close-input-port fp)
|
(close-input-port fp)
|
||||||
(cond
|
(cond
|
||||||
|
;; TODO: how to handle these recursively? IE: import set could be
|
||||||
|
;; a rename that has a prefix that has a library name
|
||||||
((tagged-list? 'only import)
|
((tagged-list? 'only import)
|
||||||
;; Filter to symbols from "only" that appear in export list
|
;; Filter to symbols from "only" that appear in export list
|
||||||
(filter
|
(filter
|
||||||
|
@ -239,6 +242,9 @@
|
||||||
(lambda (sym)
|
(lambda (sym)
|
||||||
(not (member sym (cddr import))))
|
(not (member sym (cddr import))))
|
||||||
exports))
|
exports))
|
||||||
|
;; TODO: if prefix or rename, can resolve to original lib identifier.
|
||||||
|
;; would need another function somewhere to compute the renames though.
|
||||||
|
;; maybe compute both and return a list of both???
|
||||||
(else
|
(else
|
||||||
exports))))
|
exports))))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue