class documentation

Track the current and nested state of the parser. This utility class is used to track the state of the BlockParser and support multiple levels if nesting. It's just a simple API wrapped around a list. Each time a state is set, that state is appended to the end of the list. Each time a state is reset, that state is removed from the end of the list. Therefore, each time a state is set for a nested block, that state must be reset when we back out of that level of nesting or the state could be corrupted. While all the methods of a list object are available, only the three defined below need be used.

Method isstate Test that top (current) level is of given state.
Method reset Step back one step in nested state.
Method set Set a new state.
def isstate(self, state): (source)

Test that top (current) level is of given state.

def reset(self): (source)

Step back one step in nested state.

def set(self, state): (source)

Set a new state.