mirror of
https://github.com/RustPython/Parser.git
synced 2025-08-27 13:54:55 +00:00
Make parser location optional
This commit is contained in:
parent
aabc96dde9
commit
cbe4e8c5f3
9 changed files with 18 additions and 14 deletions
|
@ -8,9 +8,9 @@ repository = "https://github.com/RustPython/RustPython"
|
|||
license = "MIT"
|
||||
|
||||
[features]
|
||||
default = ["constant-optimization", "fold", "source-code"]
|
||||
default = ["location"]
|
||||
constant-optimization = ["fold"]
|
||||
source-code = ["fold"]
|
||||
location = ["fold", "rustpython-parser-core/location"]
|
||||
fold = []
|
||||
unparse = ["rustpython-literal"]
|
||||
visitor = []
|
||||
|
|
|
@ -8,7 +8,7 @@ mod generic {
|
|||
include!("gen/generic.rs");
|
||||
}
|
||||
mod impls;
|
||||
#[cfg(feature = "source-code")]
|
||||
#[cfg(feature = "location")]
|
||||
mod source_locator;
|
||||
#[cfg(feature = "unparse")]
|
||||
mod unparse;
|
||||
|
@ -32,11 +32,12 @@ mod visitor {
|
|||
include!("gen/visitor.rs");
|
||||
}
|
||||
|
||||
#[cfg(feature = "source-code")]
|
||||
#[cfg(feature = "location")]
|
||||
pub mod located {
|
||||
include!("gen/located.rs");
|
||||
}
|
||||
|
||||
#[cfg(feature = "location")]
|
||||
pub use rustpython_parser_core::source_code;
|
||||
#[cfg(feature = "visitor")]
|
||||
pub use visitor::Visitor;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue