! DoScopeAction ! ---------------------------------------------------------------------------- [ DoScopeAction thing s p1; s = scope_reason; p1 = parser_one; #Ifdef DEBUG; if (parser_trace >= 6) print "[DSA on ", (the) thing, " with reason = ", scope_reason, " p1 = ", parser_one, " p2 = ", parser_two, "]^"; #Endif; ! DEBUG switch (scope_reason) { REACT_BEFORE_REASON: if (thing.react_before == 0 or NULL) return; #Ifdef DEBUG; if (parser_trace >= 2) print "[Considering react_before for ", (the) thing, "]^"; #Endif; ! DEBUG if (parser_one == 0) parser_one = RunRoutines(thing, react_before); REACT_AFTER_REASON: if (thing.react_after == 0 or NULL) return; #Ifdef DEBUG; if (parser_trace >= 2) print "[Considering react_after for ", (the) thing, "]^"; #Endif; ! DEBUG if (parser_one == 0) parser_one = RunRoutines(thing, react_after); EACH_TURN_REASON: if (thing.each_turn == 0 or NULL) return; #Ifdef DEBUG; if (parser_trace >= 2) print "[Considering each_turn for ", (the) thing, "]^"; #Endif; ! DEBUG PrintOrRun(thing, each_turn); TESTSCOPE_REASON: if (thing == parser_one) parser_two = 1; LOOPOVERSCOPE_REASON: indirect(parser_one, thing); parser_one=p1; } scope_reason = s; ];