Warning: session_start(): open(/var/lib/php/sessions/sess_0qq61nhr9p4lubc3uh6nkak16m, 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
scope gazelle_addForbiddenBindingHelpers.
sclass #Blocker {
S var, value; // value == null means don't change variable at all
bool debug;
*() {}
*(S *var, S *value, bool *debug) {}
SS get(SS map, LS tokC, LS tokI, RuleEngine2_MatchedRule matched) {
if (map == null) null;
if (value == null) {
if (map.containsKey(var)) null;
} else
if (eqic(value, map.get(var))) null;
ret map;
}
}
sclass #TotalBlocker {
SS get(SS map, LS tokC, LS tokI, RuleEngine2_MatchedRule matched) {
if (nempty(map)) null;
ret map;
}
}
svoid gazelle_addForbiddenBindingHelpers(RuleEngine2 engine, O... _) {
bool debug = boolPar debug(_) || boolPar forbiddenBindingsDebug(_);
for (final RuleEngine2.Rule r : engine.rules) {
for (Matches m : getJMatches_all("don't change * to *", r.comments))
r.addMapMassager(new Blocker($1, $2, debug));
for (Matches m : getJMatches_all("don't change *", r.comments))
if (isQuoted(m.get(0)))
r.addMapMassager(new Blocker($1, null, debug));
if (cic(r.comments, "don't change anything"))
r.addMapMassager(new TotalBlocker);
}
}
end scope