Stores checkpoints of nesting stacks when #if/#else is seen.
| 2295 | |
| 2296 | |
| 2297 | class _PreprocessorInfo(object): |
| 2298 | """Stores checkpoints of nesting stacks when #if/#else is seen.""" |
| 2299 | |
| 2300 | def __init__(self, stack_before_if): |
| 2301 | # The entire nesting stack before #if |
| 2302 | self.stack_before_if = stack_before_if |
| 2303 | |
| 2304 | # The entire nesting stack up to #else |
| 2305 | self.stack_before_else = [] |
| 2306 | |
| 2307 | # Whether we have already seen #else or #elif |
| 2308 | self.seen_else = False |
| 2309 | |
| 2310 | |
| 2311 | class NestingState(object): |