mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-19 01:51:30 +00:00
Add AnyNode
and AnyNodeRef
unions (#4578)
This commit is contained in:
parent
1ddc577204
commit
154439728a
6 changed files with 3228 additions and 0 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -1930,6 +1930,7 @@ dependencies = [
|
|||
"once_cell",
|
||||
"ruff_text_size",
|
||||
"rustc-hash",
|
||||
"rustpython-ast",
|
||||
"rustpython-literal",
|
||||
"rustpython-parser",
|
||||
"serde",
|
||||
|
|
|
@ -32,6 +32,7 @@ quote = { version = "1.0.23" }
|
|||
regex = { version = "1.7.1" }
|
||||
rustc-hash = { version = "1.1.0" }
|
||||
ruff_text_size = { git = "https://github.com/astral-sh/RustPython-Parser.git", rev = "335780aeeac1e6fcd85994ba001d7b8ce99fcf65" }
|
||||
rustpython-ast = { git = "https://github.com/astral-sh/RustPython-Parser.git", rev = "335780aeeac1e6fcd85994ba001d7b8ce99fcf65", default-features = false, features = ["all-nodes-with-ranges"]}
|
||||
rustpython-format = { git = "https://github.com/astral-sh/RustPython-Parser.git", rev = "335780aeeac1e6fcd85994ba001d7b8ce99fcf65" }
|
||||
rustpython-literal = { git = "https://github.com/astral-sh/RustPython-Parser.git", rev = "335780aeeac1e6fcd85994ba001d7b8ce99fcf65" }
|
||||
rustpython-parser = { git = "https://github.com/astral-sh/RustPython-Parser.git", rev = "335780aeeac1e6fcd85994ba001d7b8ce99fcf65", default-features = false, features = ["full-lexer", "all-nodes-with-ranges"] }
|
||||
|
|
|
@ -22,6 +22,7 @@ once_cell = { workspace = true }
|
|||
rustc-hash = { workspace = true }
|
||||
rustpython-literal = { workspace = true }
|
||||
rustpython-parser = { workspace = true }
|
||||
rustpython-ast = { workspace = true }
|
||||
serde = { workspace = true, optional = true }
|
||||
smallvec = { workspace = true }
|
||||
|
||||
|
|
|
@ -6,6 +6,8 @@ pub mod hashable;
|
|||
pub mod helpers;
|
||||
pub mod imports;
|
||||
pub mod newlines;
|
||||
pub mod node;
|
||||
pub mod prelude;
|
||||
pub mod relocate;
|
||||
pub mod source_code;
|
||||
pub mod statement_visitor;
|
||||
|
|
3221
crates/ruff_python_ast/src/node.rs
Normal file
3221
crates/ruff_python_ast/src/node.rs
Normal file
File diff suppressed because it is too large
Load diff
2
crates/ruff_python_ast/src/prelude.rs
Normal file
2
crates/ruff_python_ast/src/prelude.rs
Normal file
|
@ -0,0 +1,2 @@
|
|||
pub use crate::node::AstNode;
|
||||
pub use rustpython_ast::*;
|
Loading…
Add table
Add a link
Reference in a new issue