mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-15 16:57:35 +02:00
Expand contents of cond-expand
with a begin
context
This commit is contained in:
parent
ea2f44a318
commit
857c98fb87
2 changed files with 8 additions and 2 deletions
|
@ -5,6 +5,7 @@
|
|||
Bug Fixes
|
||||
|
||||
- Add type checking to record type accessor functions. We now raise an error if the passed object is of the wrong record type.
|
||||
- Fix issues with expanding `cond-expand` expressions in libraries. Previously there would be issues with the expansion if the code needed to be within the context of a `begin`.
|
||||
|
||||
## 0.20 - August 14, 2020
|
||||
|
||||
|
|
|
@ -239,8 +239,13 @@
|
|||
(lambda (d acc)
|
||||
(cond
|
||||
((tagged-list? 'cond-expand d)
|
||||
(cons (expander d) acc))
|
||||
;(lib:cond-expand-decls (expander d)))
|
||||
(let* ((expr (expander d))
|
||||
(begin? (and (pair? expr)
|
||||
(not (member (car expr)
|
||||
'(import export c-linker-options include-c-header))))))
|
||||
(if begin?
|
||||
(cons `(begin ,expr) acc)
|
||||
(cons expr acc))))
|
||||
(else
|
||||
(cons d acc)) ))
|
||||
'()
|
||||
|
|
Loading…
Add table
Reference in a new issue