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)
|
||||
(import (scheme base)
|
||||
;; Debugging: (scheme write)
|
||||
;; Debug only (scheme write)
|
||||
(scheme read)
|
||||
(scheme process-context)
|
||||
(scheme cyclone util)
|
||||
|
@ -243,9 +243,17 @@
|
|||
(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))))
|
||||
;(write `(DEBUG ,begin? ,(if (pair? expr) (lambda? (car expr)) #f) ,expr))
|
||||
;(newline)
|
||||
(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
|
||||
(cons d acc)) ))
|
||||
'()
|
||||
|
|
Loading…
Add table
Reference in a new issue