static L reTok(L tok) { replaceCollection(tok, javaTok(tok)); ret tok; } static L reTok(L tok, int i) { ret reTok(tok, i, i+1); } static L reTok(L tok, int i, int j) { // extend i to an "N" token // and j to "C" (so j-1 is an "N" token) i = max(i & ~1, 0); j = min(l(tok), j | 1); if (i >= j) ret tok; L t = javaTok(joinSubList(tok, i, j)); replaceListPart(tok, i, j, t); // fallback to safety // reTok(tok); ret tok; } ifclass IntRange static LS reTok(LS tok, IntRange r) { if (r != null) reTok(tok, r.start, r.end); ret tok; } endif