Warning: session_start(): open(/var/lib/php/sessions/sess_sip9busnrn7a9stmjdbrre1lk2, 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
static void tok_simplyCachedFunctions(L tok) { pcall {
if (!tok.contains("simplyCached")) ret;
int i = -1;
while ((i = jfind(tok, i+1, "simplyCached ")) >= 0) {
Cl modifiers = tok_modifiersLeftOf(tok, i);
int bracket = indexOf(tok, "(", i);
S fName = assertIdentifier(tok.get(bracket-2));
S type = joinSubList(tok, i+2, bracket-3);
S boxedType = tok_toNonPrimitiveTypes(type);
S mods2 = joinWithSpace(listMinus(modifiers, "transient", "final"));
// we keep the modifiers (e.g. static, transient) for the variable
// the function gets the modifiers minus "transient"
replaceTokens(tok, i, bracket-1, "\*boxedType*/ \*fName*/_cache;\n"
+ "\*mods2*/ \*type*/ \*fName*/() { if (\*fName*/_cache == null) \*fName*/_cache = \*fName*/_load(); ret \*fName*/_cache; }\n\n" + "\*mods2*/ \*boxedType*/ \*fName*/_load");
reTok(tok, i, bracket-3);
}
}}