Stores checkpoints of nesting stacks when #if/#else is seen.
| 2395 | |
| 2396 | |
| 2397 | class _PreprocessorInfo(object): |
| 2398 | """Stores checkpoints of nesting stacks when #if/#else is seen.""" |
| 2399 | |
| 2400 | def __init__(self, stack_before_if): |
| 2401 | # The entire nesting stack before #if |
| 2402 | self.stack_before_if = stack_before_if |
| 2403 | |
| 2404 | # The entire nesting stack up to #else |
| 2405 | self.stack_before_else = [] |
| 2406 | |
| 2407 | # Whether we have already seen #else or #elif |
| 2408 | self.seen_else = False |
| 2409 | |
| 2410 | |
| 2411 | class NestingState(object): |