// i must point at the opening bracket (<) // index returned is index of closing bracket (>) // If there is NO opening bracket at i, we return nothing static int tok_findEndOfAngleBracketPart(LS tok, int i) { int level = 0, n = l(tok); while ping (i < n) { S t = tok.get(i); if (eq(t, "<")) ++level; if (level < 1) ret i-2; if (eq(t, ">")) --level; if (level < 1) ret i; i += 2; } ret n; }