sS tok_insertAFewSpaces(S s) { ret join(tok_insertAFewSpaces(javaTok(s))); } static LS tok_insertAFewSpaces(LS tok) { int n = l(tok); for (int i = 1; i+2 < n; i += 2) { if (eqGet(tok, i+1, "")) { S me = get(tok, i), next = get(tok, i+2); if (eq(me, "}") && (isIdentifier(next) || eq(next, "(")) || eq(me, ")") && eq(next, "{")) tok.set(i+1, " "); } } ret tok; }