Token strings can't be used if the body contains an odd number of curly braces. This is sometimes an issue when generating mixins. Falling back to strings is ugly because code formatters fail. How about extending delimited strings to token string. s ~= q"CODE"{ { foo; }"CODE"; s ~= q"CODE"{ bar; } }"CODE";