mirror of
https://github.com/astral-sh/ruff.git
synced 2026-11-21 12:16:15 +08:00
A visitor that checks for a yield and then walks the expression can dispatch on its kind twice. Inlining walk_expr lets the compiler combine the checks and removes the stack copy of the classified expression on recursive calls. Leave inlining to the compiler with debug assertions enabled. At opt-level=0, forcing the walker into the visitor enlarges its stack frame enough to overflow the ty server thread on 2,000 nested additions.
ruff_python_ast
This crate is an internal component of Ruff. The Rust API exposed here is unstable and will have frequent breaking changes.
This version (0.0.23) is a component of Ruff 0.17.6. The source can be found here.
See Ruff's crate versioning policy for details on versioning.