Warning: session_start(): open(/var/lib/php/sessions/sess_jv0sd0agoe77pvrneeo51v5kc9, 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
/* event change; =>
transient L onChange;
selfType onChange(Runnable r) { onChange = syncAddOrCreate(onChange, r); this; }
void change() { pcallFAll(onChange); }
*/
static void tok_eventFunctions(L tok) {
int i;
while ((i = jfind(tok, "event ")) >= 0) {
int iSemicolon = i+4;
S args = "";
if (eqGet(tok, i+4, "(")) {
int argsFrom = i+6;
int argsTo = findCodeTokens(tok, argsFrom, false, ")");
args = joinSubList(tok, argsFrom, argsTo-1);
iSemicolon = argsTo+2;
fail("TODO: event with args");
}
// TODO: parse modifiers in square brackets
//if (eqGet(tok, iSemicolon, "["))
assertEquals(";", get(tok, iSemicolon));
S change = tok.get(i+2);
S onChange = "on" + firstToUpper(change);
replaceTokens_reTok(tok, i, iSemicolon+1,
"transient L \*onChange*/;\n" +
"selfType \*onChange*/(Runnable r) { \*onChange*/ = syncAddOrCreate(\*onChange*/, r); this; }\n" +
"void \*change*/() { pcallFAll(\*onChange*/); }");
}
}