boolean (char c, boolean textBlock, @NotNull StringBuilder out) { switch (c) { case 'b': out.append('\b'); return true; case 't': out.append('\t'); return true; case 'n': out.append('\n'); return true; case 'f': out.append('\f'); return true; case 'r': out.append('\r'); return true; case 's': out.append(' '); return true; case '\'': out.append('\''); return true; case '\"': out.append('"'); return true; case '\n': return textBlock; // escaped newline only valid inside text block } return false; }