mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-15 16:57:35 +02:00
Simplified code
This commit is contained in:
parent
4905df6261
commit
2d68fde138
1 changed files with 2 additions and 13 deletions
|
@ -844,25 +844,14 @@
|
||||||
(list (string-append
|
(list (string-append
|
||||||
(car (c:allocs c-fun))
|
(car (c:allocs c-fun))
|
||||||
(if (prim/c-var-assign fun)
|
(if (prim/c-var-assign fun)
|
||||||
;; Add a comma if there were any args to the func
|
;; Add a comma if there were any args to the func added by comp-prim
|
||||||
(let* ((fnc-str (car (c:allocs c-fun)))
|
(if (str-ending? (car (c:allocs c-fun)) "(") "" ",")
|
||||||
(len (string-length fnc-str)))
|
|
||||||
;(write (string-append "(JAE-DEBUG " fnc-str))
|
|
||||||
TODO: rewrite cond below in terms of (str-ending?)
|
|
||||||
(cond
|
|
||||||
((and (> len 0)
|
|
||||||
(not (equal? "("
|
|
||||||
(substring fnc-str (- len 1) len))))
|
|
||||||
",")
|
|
||||||
(else "")))
|
|
||||||
",")
|
",")
|
||||||
(c:body c-args*) ");"))))
|
(c:body c-args*) ");"))))
|
||||||
;; Args stay with body
|
;; Args stay with body
|
||||||
(c:append
|
(c:append
|
||||||
(c:append
|
(c:append
|
||||||
(let ()
|
(let ()
|
||||||
;(display "JAE DEBUG2: ")
|
|
||||||
;(write c-fun)
|
|
||||||
;; Add a comma if necessary
|
;; Add a comma if necessary
|
||||||
(if (str-ending? (c:body c-fun) "(")
|
(if (str-ending? (c:body c-fun) "(")
|
||||||
c-fun
|
c-fun
|
||||||
|
|
Loading…
Add table
Reference in a new issue