mirror of
https://github.com/RustPython/Parser.git
synced 2025-08-04 10:49:55 +00:00
vendor text_size and source_location (#102)
This commit is contained in:
parent
b07966695a
commit
d09bce80e6
29 changed files with 175 additions and 311 deletions
|
@ -8,14 +8,12 @@ repository = "https://github.com/RustPython/Parser/"
|
|||
license = "MIT"
|
||||
|
||||
[dependencies]
|
||||
# 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 }
|
||||
|
||||
# vendored dependency shouldn't be placed out of this crate
|
||||
rustpython-parser-vendored.workspace = true
|
||||
serde = { version = "1.0.133", optional = true, default-features = false, features = ["derive"] }
|
||||
is-macro.workspace = true
|
||||
memchr.workspace = true
|
||||
|
||||
[features]
|
||||
default = []
|
||||
location = ["dep:ruff_source_location"]
|
||||
location = []
|
||||
|
|
|
@ -11,5 +11,6 @@ pub use error::BaseError;
|
|||
pub use format::ConversionFlag;
|
||||
pub use mode::Mode;
|
||||
|
||||
// re-export our public interface
|
||||
pub use ruff_text_size as text_size;
|
||||
#[cfg(feature = "location")]
|
||||
pub use rustpython_parser_vendored::source_location;
|
||||
pub use rustpython_parser_vendored::text_size;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
use crate::text_size::{TextLen, TextSize};
|
||||
use memchr::memrchr2;
|
||||
|
||||
pub use ruff_source_location::{
|
||||
pub use crate::source_location::{
|
||||
newlines::{find_newline, UniversalNewlineIterator},
|
||||
LineIndex, OneIndexed, SourceCode, SourceLocation,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue