mirror of
https://github.com/RustPython/Parser.git
synced 2025-08-04 10:49:55 +00:00
Vendor SourceLocation from ruff
This commit is contained in:
parent
1d366d52ab
commit
4dc030ba9d
8 changed files with 1741 additions and 9 deletions
|
@ -11,12 +11,14 @@ license = "MIT"
|
|||
itertools = { workspace = true }
|
||||
num-bigint = { workspace = true }
|
||||
num-complex = { workspace = true }
|
||||
serde = { version = "1.0.133", optional = true, default-features = false, features = ["derive"] }
|
||||
ruff_text_size = { path = "../ruff_text_size" }
|
||||
ruff_python_ast = { workspace = true }
|
||||
|
||||
# ruff dependency shouldn't be placed out of this crate
|
||||
ruff_text_size = { path = "../ruff_text_size" }
|
||||
ruff_source_location = { path = "../ruff_source_location", optional = true }
|
||||
|
||||
serde = { version = "1.0.133", optional = true, default-features = false, features = ["derive"] }
|
||||
lz4_flex = "0.9.2"
|
||||
|
||||
[features]
|
||||
default = ["source-code"]
|
||||
source-code = []
|
||||
source-code = ["ruff_source_location"]
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// re-export our public interface
|
||||
pub use ruff_python_ast::source_code::*;
|
||||
pub use ruff_source_location::*;
|
||||
|
||||
pub type LineNumber = ruff_python_ast::source_code::OneIndexed;
|
||||
pub type LineNumber = OneIndexed;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct SourceRange {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue