mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-19 05:39:17 +02:00
Added include-c-header
This commit is contained in:
parent
f0e45111e4
commit
c594cdadbe
2 changed files with 11 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
||||||
(define-library (example life)
|
(define-library (example life)
|
||||||
|
(include-c-header "../write-png.h")
|
||||||
(export life)
|
(export life)
|
||||||
(import (scheme base) ;TODO: (except (scheme base) set!)
|
(import (scheme base) ;TODO: (except (scheme base) set!)
|
||||||
(scheme write)
|
(scheme write)
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
lib:imports
|
lib:imports
|
||||||
lib:body
|
lib:body
|
||||||
lib:includes
|
lib:includes
|
||||||
|
lib:include-c-headers
|
||||||
lib:import->filename
|
lib:import->filename
|
||||||
lib:import->metalist
|
lib:import->metalist
|
||||||
lib:import->path
|
lib:import->path
|
||||||
|
@ -115,6 +116,15 @@
|
||||||
(tagged-list? 'include code))
|
(tagged-list? 'include code))
|
||||||
(cddr ast))))
|
(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
|
;; TODO: include-ci, cond-expand
|
||||||
|
|
||||||
(define (lib:atom->string atom)
|
(define (lib:atom->string atom)
|
||||||
|
|
Loading…
Add table
Reference in a new issue