Commit 940968e7 authored by Luca Bataillard's avatar Luca Bataillard
Browse files

fix transformApp

parent 0c0fa78f
......@@ -20,9 +20,9 @@ object CL3ToCPSTranslator extends (S.Tree => C.Tree) {
// Transforms each arg successively, accumulate generated atoms. At bottom create letc-apply
// expression. Return resulting tree
def transformArgs(es: Seq[S.Tree])(fId: C.Atom, ids: Seq[C.Atom]): C.Tree = args match {
def transformArgs(args: Seq[S.Tree])(fId: C.Atom, ids: Seq[C.Atom]): C.Tree = args match {
case Nil => C.LetC(Seq(returnCnt), C.AppF(fId, cntName, ids))
case e :: es => transform(e)(v => transformArgs(es)(fId, ids :+ v))
case arg :: args => transform(arg)(v => transformArgs(args)(fId, ids :+ v))
}
// Transform initial function then start argument transformation
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment