progs/fun/funt.sc
changeset 976 e9eac62928f5
parent 958 fddf099a82f8
equal deleted inserted replaced
975:ae5c03560d4d 976:e9eac62928f5
   154 }
   154 }
   155 
   155 
   156 // main compiler functions
   156 // main compiler functions
   157 def compile(prog: List[Decl], class_name: String) : String = {
   157 def compile(prog: List[Decl], class_name: String) : String = {
   158   val instructions = prog.map(compile_decl).mkString
   158   val instructions = prog.map(compile_decl).mkString
   159   (library + instructions).replaceAllLiterally("XXX", class_name)
   159   (library + instructions).replace("XXX", class_name)
   160 }
   160 }
   161 
   161 
   162 // pre-2.5.0 ammonite 
   162 // pre-2.5.0 ammonite 
   163 // import ammonite.ops._
   163 // import ammonite.ops._
   164 
   164