Module python_ast::preprocessor::blockscope [] [src]

Discover scoping as a preprocessing step to reduce the need to carry around extra state in either the Lexer or Parser.

Structs

BlockScopePreprocessor

Preprocessor to splice BlockStart and BlockEnd tokens based on indent deltas into the slice of tokens so we do not have to keep the state in the main parser logic.

Constants

BLOCK_END
BLOCK_START
INDENT_STACK_SIZE

Limit taken from CPython. They use a fixed size array to cap the indent stack.

LINE_CONT
TK_BLOCK_END
TK_BLOCK_START
TK_LINE_CONT
_IMPL_SERIALIZE_FOR_BlockScopePreprocessor