forked from alex-eg/sex
define an empty lambda as an empty function
A lifted function with no body was a declaration of one, and nothing defined it, so the program did not link.
This commit is contained in:
@@ -511,7 +511,16 @@ forms, and what remains."
|
||||
,(atom-to-fmt-c name)
|
||||
,(walk-arglist args)
|
||||
.
|
||||
,(walk-body maybe-body)))))
|
||||
,(let ((body (walk-body maybe-body)))
|
||||
;; one that is empty blocks, and where they were, is nothing:
|
||||
;; what a lifted empty lambda is given to be a definition
|
||||
(if (every (lambda (s) (equal? s '(%block-begin)))
|
||||
(remove line-directive? body))
|
||||
(list)
|
||||
body))))))
|
||||
|
||||
(define (line-directive? form)
|
||||
(and (pair? form) (eq? (car form) '%line)))
|
||||
|
||||
;;; The type of one parameter
|
||||
(define (arg-type arg)
|
||||
|
||||
Reference in New Issue
Block a user