Inform - Support - Source

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing parserm.h

DoScopeAction (lines 3025-3064)

3025  !  DoScopeAction
3026  ! ----------------------------------------------------------------------------
3027   
3028  [ DoScopeAction thing s p1;
3029    s = scope_reason; p1=parser_one;
3030  #ifdef DEBUG;
3031    if (parser_trace>=6)
3032    {   print "[DSA on ", (the) thing, " with reason = ", scope_reason,
3033        " p1 = ", parser_one, " p2 = ", parser_two, "]^";
3034    }
3035  #endif;
3036    switch(scope_reason)
3037    {   REACT_BEFORE_REASON:
3038            if (thing.react_before==0 or NULL) return;
3039  #ifdef DEBUG;
3040            if (parser_trace>=2)
3041            {   print "[Considering react_before for ", (the) thing, "]^"; }
3042  #endif;
3043            if (parser_one==0) parser_one = RunRoutines(thing,react_before);
3044        REACT_AFTER_REASON:
3045            if (thing.react_after==0 or NULL) return;
3046  #ifdef DEBUG;
3047            if (parser_trace>=2)
3048            {   print "[Considering react_after for ", (the) thing, "]^"; }
3049  #endif;
3050            if (parser_one==0) parser_one = RunRoutines(thing,react_after);
3051        EACH_TURN_REASON:
3052            if (thing.each_turn == 0 or NULL) return;
3053  #ifdef DEBUG;
3054            if (parser_trace>=2)
3055            {   print "[Considering each_turn for ", (the) thing, "]^"; }
3056  #endif;
3057            PrintOrRun(thing, each_turn);
3058        TESTSCOPE_REASON:
3059            if (thing==parser_one) parser_two = 1;
3060        LOOPOVERSCOPE_REASON:
3061            indirect(parser_one,thing); parser_one=p1;
3062    }
3063    scope_reason = s;
3064  ];


Last updated 27 February 2004. This site is no longer supported; information may be out of date.
Maintained as a historical archive by the Interactive Fiction Technology Foundation. Copyright 1993-2018 IFTF, CC-BY-SA unless otherwise noted.
This page was originally managed by Graham Nelson (graham@gnelson.demon.co.uk) assisted by C Knight.