Vendor SourceLocation from ruff

This commit is contained in:
Jeong YunWon 2023-05-10 15:27:28 +09:00
parent 1d366d52ab
commit 4dc030ba9d
8 changed files with 1741 additions and 9 deletions

View file

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

View file

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