static boolean jreplace_singlePosition(L tok, int i, S in, S out) { L tokin = javaTok(in); jfind_preprocess(tokin); S[] toks = toStringArray(codeTokensOnly(tokin)); int i = findCodeTokens(tok, 1, ignoreCase, toks, condition); if (i < 0) ret anyChange; L subList = tok.subList(i-1, i+l(tokin)-1); // N to N S expansion = jreplaceExpandRefs(out, subList); int end = i+l(tokin)-2; clearAllTokens(tok, i, end); // C to C tok.set(i, expansion); if (reTok) // would this ever be false?? reTok(tok, i, end); anyChange = true; } throw fail("woot? 10000! " + quote(in) + " => " + quote(out)); } static bool jreplace_debug;