progs/while/compile.sc
changeset 973 db987b9717a4
parent 960 791f4d9f53e1
equal deleted inserted replaced
972:1544a674dd35 973:db987b9717a4
    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