Skip to main content

Module compiler

Module compiler 

Source

Modules§

ast
codegen
Compile a Python AST or source code into bytecode consumable by RustPython.
core
parser
This crate can be used to parse Python source code into an Abstract Syntax Tree.

Structs§

CodeObject
Primary container of a single code object. Each python function has a code object. Also a module has a code object.
CompileOpts
ParseError
Tokens
Tokens represents a vector of lexed Token.

Enums§

CompileError
CompileErrorType
Mode
TokenKind
A kind of a token.

Functions§

_compile_symtable
compile
Compile a given source code into a bytecode object.
compile_symtable
compile_with_syntax_warning_handler
dont_imply_dedent_source_error
Detect input that only parses because Ruff’s lexer closes indentation at EOF.
long_decimal_integer_literal_error
Return the syntax error for a decimal integer literal exceeding the configured limit.
pre_parse_source_error
Source-level errors raised before parsing, as CPython’s tokenizer does.
too_deeply_nested_error
Rejects an AST nested deeper than limit.