Add AnyNode and AnyNodeRef unions (#4578)

This commit is contained in:
Micha Reiser 2023-05-23 08:53:22 +02:00 committed by GitHub
parent 1ddc577204
commit 154439728a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 3228 additions and 0 deletions

1
Cargo.lock generated
View file

@ -1930,6 +1930,7 @@ dependencies = [
"once_cell",
"ruff_text_size",
"rustc-hash",
"rustpython-ast",
"rustpython-literal",
"rustpython-parser",
"serde",

View file

@ -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"] }

View file

@ -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 }

View file

@ -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;

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,2 @@
pub use crate::node::AstNode;
pub use rustpython_ast::*;