Skip to main content

Crate python_ast

Crate python_ast 

Source

Re-exports§

pub use ast::*;
pub use codegen::*;
pub use isidentifier::*;
pub use symbols::*;
pub use parser::*;
pub use result::*;
pub use datamodel::*;
pub use traits::*;
pub use parser_utils::*;

Modules§

ast
python-ast-rs
codegen
Code generation for Python ASTs.
datamodel
Module representing the Python Data Model in Rust form. See: here.
isidentifier
This module uses Python to determine if a given string is a valid Python identifier or not. See here
macros
parser
parser_utils
pytypes
result
Error and result types for the python-ast crate.
symbols
Implements a Python-compatilble symbol table for Rust.
traits

Macros§

create_parse_test
Macros for reducing code duplication in the python-ast library. Macro for generating test functions for AST parsing. Reduces duplication in test code. Asserts that both parsing and code generation succeed and that the generated stream is non-empty, so codegen regressions actually fail the test.
impl_node_with_positions
Macro for generating Node trait implementations with optional position fields. This macro automatically implements the Node trait for types that have position fields.

Type Aliases§

PyResult
Represents the result of a Python call.