equal
deleted
inserted
replaced
73 import scala.language.implicitConversions |
73 import scala.language.implicitConversions |
74 import scala.language.reflectiveCalls |
74 import scala.language.reflectiveCalls |
75 |
75 |
76 // convenience for code-generation (string interpolations) |
76 // convenience for code-generation (string interpolations) |
77 extension (sc: StringContext) { |
77 extension (sc: StringContext) { |
78 def i(args: Any*): String = " " ++ sc.s(args:_*) ++ "\n" // instructions |
78 def i(args: Any*): String = " " ++ sc.s(args*) ++ "\n" // instructions |
79 def l(args: Any*): String = sc.s(args:_*) ++ ":\n" // labels |
79 def l(args: Any*): String = sc.s(args*) ++ ":\n" // labels |
80 def m(args: Any*): String = sc.s(args:_*) ++ "\n" // methods |
80 def m(args: Any*): String = sc.s(args*) ++ "\n" // methods |
81 } |
81 } |
82 |
82 |
83 // variable / index environments |
83 // variable / index environments |
84 type Env = Map[String, Int] |
84 type Env = Map[String, Int] |
85 |
85 |