progs/fun_llvm.scala
changeset 678 ff3b48da282c
parent 657 732cb155d806
child 679 8fc109f36b78
equal deleted inserted replaced
677:decfd8cf8180 678:ff3b48da282c
    58 def Fresh(x: String) = {
    58 def Fresh(x: String) = {
    59   counter += 1
    59   counter += 1
    60   x ++ "_" ++ counter.toString()
    60   x ++ "_" ++ counter.toString()
    61 }
    61 }
    62 
    62 
    63 // Abstract syntax trees for the Fun language
    63 // Internal CPS language for FUN
    64 abstract class KExp
    64 abstract class KExp
    65 abstract class KVal
    65 abstract class KVal
    66 
    66 
    67 case class KVar(s: String) extends KVal
    67 case class KVar(s: String) extends KVal
    68 case class KNum(i: Int) extends KVal
    68 case class KNum(i: Int) extends KVal