equal
deleted
inserted
replaced
72 // generating instructions, labels etc |
72 // generating instructions, labels etc |
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 implicit def sring_inters(sc: StringContext) = new { |
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 |