mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Issue #137 - added the include
macro
This commit is contained in:
parent
a08e946380
commit
4bfece04a3
2 changed files with 17 additions and 0 deletions
|
@ -7,6 +7,7 @@ Features:
|
|||
|
||||
- Recognize escaped vertical line and hex scalar value characters when reading a string.
|
||||
- Added `current-thread` to SRFI 18.
|
||||
- Added the `include` macro.
|
||||
|
||||
Bug Fixes
|
||||
|
||||
|
|
|
@ -13,9 +13,25 @@
|
|||
(export
|
||||
read
|
||||
read-all
|
||||
include
|
||||
)
|
||||
(begin
|
||||
|
||||
(define-syntax include
|
||||
(er-macro-transformer
|
||||
(lambda (expr rename compare)
|
||||
(apply
|
||||
append
|
||||
(cons
|
||||
'(begin)
|
||||
(map
|
||||
(lambda (filename)
|
||||
(call-with-port
|
||||
(open-input-file filename)
|
||||
(lambda (port)
|
||||
(read-all port))))
|
||||
(cdr expr)))))))
|
||||
|
||||
(define read cyc-read)
|
||||
|
||||
;; Extended information for each input port
|
||||
|
|
Loading…
Add table
Reference in a new issue