progs/while/compile.sc
changeset 974 0cb4bf2469d1
parent 961 c0600f8b6427
equal deleted inserted replaced
973:f25d338d16c9 974:0cb4bf2469d1
    79 // convenient string interpolations 
    79 // convenient string interpolations 
    80 // for instructions and labels
    80 // for instructions and labels
    81 
    81 
    82 extension (sc: StringContext) {
    82 extension (sc: StringContext) {
    83     def i(args: Any*): String = "   " ++ sc.s(args:_*) ++ "\n"
    83     def i(args: Any*): String = "   " ++ sc.s(args:_*) ++ "\n"
    84     def l(args: Any*): String = sc.s(args:_*) ++ ":"
    84     def l(args: Any*): String = sc.s(args:_*) ++ ":\n"
    85 }
    85 }
    86 
    86 
    87 // this allows us to write things like
    87 // this allows us to write things like
    88 // i"iadd" and l"Label"
    88 // i"iadd" and l"Label"
    89 
    89