Inform - Support - Source

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing parserm.h

DoScopeAction (lines 3774-3813)

3774  !  DoScopeAction
3775  ! ----------------------------------------------------------------------------
3776   
3777  [ DoScopeAction thing s p1;
3778      s = scope_reason; p1 = parser_one;
3779      #Ifdef DEBUG;
3780      if (parser_trace >= 6)
3781          print "[DSA on ", (the) thing, " with reason = ", scope_reason,
3782              " p1 = ", parser_one, " p2 = ", parser_two, "]^";
3783      #Endif; ! DEBUG
3784      switch (scope_reason) {
3785        REACT_BEFORE_REASON:
3786          if (thing.react_before == 0 or NULL) return;
3787          #Ifdef DEBUG;
3788          if (parser_trace >= 2)
3789                print "[Considering react_before for ", (the) thing, "]^";
3790          #Endif; ! DEBUG
3791          if (parser_one == 0) parser_one = RunRoutines(thing, react_before);
3792        REACT_AFTER_REASON:
3793          if (thing.react_after == 0 or NULL) return;
3794          #Ifdef DEBUG;
3795          if (parser_trace >= 2)
3796              print "[Considering react_after for ", (the) thing, "]^";
3797          #Endif; ! DEBUG
3798          if (parser_one == 0) parser_one = RunRoutines(thing, react_after);
3799        EACH_TURN_REASON:
3800          if (thing.each_turn == 0 or NULL) return;
3801          #Ifdef DEBUG;
3802          if (parser_trace >= 2)
3803                print "[Considering each_turn for ", (the) thing, "]^";
3804          #Endif; ! DEBUG
3805          PrintOrRun(thing, each_turn);
3806        TESTSCOPE_REASON:
3807          if (thing == parser_one) parser_two = 1;
3808        LOOPOVERSCOPE_REASON:
3809          indirect(parser_one, thing);
3810          parser_one=p1;
3811      }
3812      scope_reason = s;
3813  ];


Last updated 27 February 2004. The librarian in charge of this page is Graham Nelson (graham@gnelson.demon.co.uk) assisted by C Knight. Please email any comments, suggestions or corrections to cedenqs@inform-fiction.org.