mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-24 12:35:05 +02:00
WIP
This commit is contained in:
parent
8e64b7a40d
commit
fa682dfbfd
1 changed files with 7 additions and 1 deletions
8
cgen.scm
8
cgen.scm
|
@ -149,15 +149,21 @@
|
||||||
trace))
|
trace))
|
||||||
|
|
||||||
TODO: don't just do this, need to output as valid C code...
|
TODO: don't just do this, need to output as valid C code...
|
||||||
|
TODO: try and output this as the first expression after all var declarations.
|
||||||
|
may require change where this is called, though
|
||||||
(define (st:->code trace)
|
(define (st:->code trace)
|
||||||
;;(write `(JAE DEBUG ,trace))
|
;;(write `(JAE DEBUG ,trace))
|
||||||
(if (or (not (pair? trace))
|
(if (or (not (pair? trace))
|
||||||
(null? (cdr trace)))
|
(null? (cdr trace)))
|
||||||
""
|
""
|
||||||
(string-append
|
(string-append
|
||||||
|
"Cyc_st_add(\""
|
||||||
(car trace)
|
(car trace)
|
||||||
":"
|
":"
|
||||||
(symbol->string (cdr trace)))))
|
;; TODO: escape backslashes
|
||||||
|
(symbol->string (cdr trace))
|
||||||
|
"\");\n"
|
||||||
|
)))
|
||||||
|
|
||||||
;; END st helpers
|
;; END st helpers
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue