progs/fun/funt.sc
changeset 975 c07777e9956a
parent 957 03c5a8987141
equal deleted inserted replaced
974:06148fc63273 975:c07777e9956a
   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