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
|
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.
|
- 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
|
## 0.20 - August 14, 2020
|
||||||
|
|
||||||
|
|
|
@ -239,8 +239,13 @@
|
||||||
(lambda (d acc)
|
(lambda (d acc)
|
||||||
(cond
|
(cond
|
||||||
((tagged-list? 'cond-expand d)
|
((tagged-list? 'cond-expand d)
|
||||||
(cons (expander d) acc))
|
(let* ((expr (expander d))
|
||||||
;(lib:cond-expand-decls (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
|
(else
|
||||||
(cons d acc)) ))
|
(cons d acc)) ))
|
||||||
'()
|
'()
|
||||||
|
|
Loading…
Add table
Reference in a new issue