mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
WIP
This commit is contained in:
parent
28e70a71e6
commit
80f717452e
1 changed files with 14 additions and 0 deletions
|
@ -22,6 +22,7 @@
|
|||
(scheme cyclone primitives)
|
||||
(scheme cyclone pretty-print)
|
||||
(scheme cyclone util)
|
||||
; (srfi 69)
|
||||
)
|
||||
(export
|
||||
*defined-macros*
|
||||
|
@ -1293,6 +1294,12 @@
|
|||
(difference fv (built-in-syms)))
|
||||
(list))))))
|
||||
|
||||
;;
|
||||
;; Helpers to syntax check primitive calls
|
||||
;;
|
||||
;(define *prim-args-table*
|
||||
; (alist->hash-table *primitives-num-args*))
|
||||
|
||||
;; CPS conversion
|
||||
;;
|
||||
;; This is a port of code from the 90-minute Scheme->C Compiler by Marc Feeley
|
||||
|
@ -1340,6 +1347,13 @@
|
|||
cont-ast)))))
|
||||
|
||||
((prim-call? ast)
|
||||
;(prim:check-arg-count
|
||||
; (car ast)
|
||||
; (- (length ast) 1)
|
||||
; (hash-table-ref/default
|
||||
; *prim-args-table*
|
||||
; (car ast)
|
||||
; #f))
|
||||
(cps-list (cdr ast) ; args to primitive function
|
||||
(lambda (args)
|
||||
(list cont-ast
|
||||
|
|
Loading…
Add table
Reference in a new issue