mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-09 22:17:33 +02:00
Added 'foreign-code' macro
This commit is contained in:
parent
1a797b154b
commit
1adb0e290d
1 changed files with 10 additions and 2 deletions
|
@ -13,7 +13,7 @@
|
|||
)
|
||||
;(include-c-header "<ck_pr.h>")
|
||||
(export
|
||||
;; TODO
|
||||
foreign-code
|
||||
)
|
||||
(begin
|
||||
;; TODO: internal to compiler? Anything to define in this library??
|
||||
|
@ -49,6 +49,14 @@
|
|||
; )))))
|
||||
|
||||
|
||||
TODO: macros for foreign-value, foreign-code
|
||||
(define-syntax foreign-code
|
||||
(er-macro-transformer
|
||||
(lambda (expr rename compare)
|
||||
(for-each
|
||||
(lambda (arg)
|
||||
(if (not (string? arg))
|
||||
(error "foreign-code" "Invalid argument: string expected, received " arg)))
|
||||
(cdr expr))
|
||||
`(Cyc-foreign-code ,@(cdr expr)))))
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue