Warning: session_start(): open(/var/lib/php/sessions/sess_5iequ803au1lqnq07r8ubaq33e, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
svoid tok_selfType(L tok) {
int i;
mainLoop: while ((i = jfind(tok, "selfType", (_tok, nIdx) -> {
// TODO: Do we even need any conditions here?
S prev = get(_tok, nIdx-1);
S next = get(_tok, nIdx+3);
ret isIdentifier(next) || eqOneOf(next, ".", "(")
|| eq(prev, "(") && eq(next, ")");
})) >= 0) {
// Now find class name by going backwards.
int j = i, level = 1;
while (j > 0 && level > 0) {
S t = tok.get(j);
if (t.equals("}")) ++level;
if (t.equals("{")) --level;
j -= 2;
}
// search for class name
while (j > 0) {
S t = tok.get(j);
if (eqOneOf(t, "class", "interface", "enum") && isIdentifier(get(tok, j+2))) {
S type = tok_typeArgs_declToInvocation(tok_scanType(tok, j+2));
if (eqGet(tok, i+2, ".") && eqGet(tok, i+4, "class"))
type = tok_dropTypeParameters(type);
tokSet_reTok(tok, i, type);
continue mainLoop;
}
j -= 2;
}
tok.set(i, "Object"); // avoid endless loop if no outer class found
}
}