mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-25 04:55:04 +02:00
Added TODO's and test cases
This commit is contained in:
parent
fe0e357d14
commit
3f6f22d4b6
1 changed files with 11 additions and 0 deletions
|
@ -285,11 +285,13 @@
|
||||||
;; Filter to symbols from "only" that appear in export list
|
;; Filter to symbols from "only" that appear in export list
|
||||||
(filter
|
(filter
|
||||||
(lambda (sym)
|
(lambda (sym)
|
||||||
|
;; TODO: not good enough, need to handle renamed identifiers
|
||||||
(member sym exports))
|
(member sym exports))
|
||||||
(cddr import-set)))
|
(cddr import-set)))
|
||||||
((tagged-list? 'except import-set)
|
((tagged-list? 'except import-set)
|
||||||
(filter
|
(filter
|
||||||
(lambda (sym)
|
(lambda (sym)
|
||||||
|
;; TODO: not good enough, need to handle renamed identifiers
|
||||||
(not (member sym (cddr import-set))))
|
(not (member sym (cddr import-set))))
|
||||||
exports))
|
exports))
|
||||||
;;((tagged-list? 'prefix import-set)
|
;;((tagged-list? 'prefix import-set)
|
||||||
|
@ -303,6 +305,15 @@
|
||||||
;; I think that will be OK.
|
;; I think that will be OK.
|
||||||
(else
|
(else
|
||||||
exports)))
|
exports)))
|
||||||
|
;; TODO: test cases for above:
|
||||||
|
;cyclone> (lib:import-set/exports->imports '(lib) '(a b c d e))
|
||||||
|
;(a b c d e)
|
||||||
|
;cyclone> (lib:import-set/exports->imports '(except (lib) a) '(a b c d e))
|
||||||
|
;(b c d e)
|
||||||
|
;cyclone> (lib:import-set/exports->imports '(rename (lib) (a a1) (d d1)) '(a b c d e))
|
||||||
|
;((a a1) b c (d d1) e)
|
||||||
|
;cyclone> (lib:import-set/exports->imports '(prefix (lib) my-) '(a b c d e))
|
||||||
|
;(my-a my-b my-c my-d my-e)
|
||||||
|
|
||||||
;; Take a list of imports and resolve it to the imported vars
|
;; Take a list of imports and resolve it to the imported vars
|
||||||
;(define (lib:resolve-imports imports)
|
;(define (lib:resolve-imports imports)
|
||||||
|
|
Loading…
Add table
Reference in a new issue