Added include-c-header

This commit is contained in:
Justin Ethier 2016-04-19 23:28:40 -04:00
parent f0e45111e4
commit c594cdadbe
2 changed files with 11 additions and 0 deletions

View file

@ -1,4 +1,5 @@
(define-library (example life)
(include-c-header "../write-png.h")
(export life)
(import (scheme base) ;TODO: (except (scheme base) set!)
(scheme write)

View file

@ -30,6 +30,7 @@
lib:imports
lib:body
lib:includes
lib:include-c-headers
lib:import->filename
lib:import->metalist
lib:import->path
@ -115,6 +116,15 @@
(tagged-list? 'include code))
(cddr ast))))
(define (lib:include-c-headers ast)
(map
(lambda (inc-lst)
(cadr inc-lst))
(filter
(lambda (code)
(tagged-list? 'include-c-header code))
(cddr ast))))
;; TODO: include-ci, cond-expand
(define (lib:atom->string atom)