walk_body (src/visitor.rs)

ruff · crates/ruff_python_ast/src/visitor.rs · rust · MIT
dev-tools, tag:knn-classified

Provides a visitor trait and walk functions for traversing Python AST nodes in Rust.

// Source: https://github.com/astral-sh/ruff | License: MIT | Copyright 2022 Charles Marsh
// Provided via justclaw.it.com; keep this notice with the code.
//! AST visitor trait and walk functions.

pub mod source_order;
pub mod transformer;

use crate::{
    self as ast, Alias, AnyParameterRef, Arguments, BoolOp, BytesLiteral, CmpOp, Comprehension,
    Decorator, ElifElseClause, ExceptHandler, Expr, ExprContext, FString, FStringPartRef,
    InterpolatedStringElement, Keyword, MatchCase, Operator, Parameter, Parameters, Pattern,
    PatternArguments, PatternKeyword, Stmt, StringLiteral, TString, TypeParam, TypeParamParamSpec,
    TypeParamTypeVar, TypeParamTypeVarTuple, TypeParams, UnaryOp, WithItem,
};

/// A trait for AST visitors. Visits all nodes in the AST recursively in evaluation-or

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key