sS gazelle_deepReplaceVars(SS map, S s, O... _) { LS tok = javaTokWithBrackets(s); ret join(mapCodeTokens(tok, t -> { bool round = tok_isRoundBracketed(t); bool curly = tok_isCurlyBracketed(t); if (!round && !curly) ret getOrKeep(map, t); t2 = tok_deRoundOrCurlyBracket(t); t3 = gazelle_deepReplaceVars(map, t2, _); if (t2 == t3) ret t; ret round ? roundBracket(t) : curlyBracket(t); })); }