mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-11 23:07:36 +02:00
Enclose (include) code in (begin)
This commit is contained in:
parent
07d0256005
commit
26a7542d18
1 changed files with 12 additions and 4 deletions
|
@ -15,7 +15,7 @@
|
||||||
;;;;
|
;;;;
|
||||||
(define-library (scheme cyclone libraries)
|
(define-library (scheme cyclone libraries)
|
||||||
(import (scheme base)
|
(import (scheme base)
|
||||||
;; Debugging: (scheme write)
|
;; Debug only (scheme write)
|
||||||
(scheme read)
|
(scheme read)
|
||||||
(scheme process-context)
|
(scheme process-context)
|
||||||
(scheme cyclone util)
|
(scheme cyclone util)
|
||||||
|
@ -243,9 +243,17 @@
|
||||||
(begin? (and (pair? expr)
|
(begin? (and (pair? expr)
|
||||||
(not (member (car expr)
|
(not (member (car expr)
|
||||||
'(import export c-linker-options include-c-header))))))
|
'(import export c-linker-options include-c-header))))))
|
||||||
(if begin?
|
;(write `(DEBUG ,begin? ,(if (pair? expr) (lambda? (car expr)) #f) ,expr))
|
||||||
(cons `(begin ,expr) acc)
|
;(newline)
|
||||||
(cons expr acc))))
|
(cond
|
||||||
|
((and (pair? expr)
|
||||||
|
(lambda? (car expr))
|
||||||
|
(eq? '() (lambda->formals (car expr))))
|
||||||
|
(cons `(begin ,@(lambda->exp (car expr))) acc))
|
||||||
|
(begin?
|
||||||
|
(cons `(begin ,expr) acc))
|
||||||
|
(else
|
||||||
|
(cons expr acc)))))
|
||||||
(else
|
(else
|
||||||
(cons d acc)) ))
|
(cons d acc)) ))
|
||||||
'()
|
'()
|
||||||
|
|
Loading…
Add table
Reference in a new issue