This commit is contained in:
Justin Ethier 2015-07-14 02:00:09 -04:00
parent 8e64b7a40d
commit fa682dfbfd

View file

@ -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