1 unstable release
0.1.0 | Nov 13, 2022 |
---|
#392 in #python
10KB
158 lines
pep508_parser
This crate parses PEP-508 strings for Rust. It uses pest under the hood to parse a simplified version of the Parsing Expression Grammar (PEG) of the PEP-508 standard.
[dependencies]
pep508_parser = "0.1.0"
use pep508_parser::parse;
fn main() {
let dependency =
parse("name[quux, strange];python_version<'2.7' and platform_version=='2'").unwrap();
}
lib.rs
:
pep508_parser
PEP-508 parser by creating a Parsing Expression Grammar (PEG) for PEP-508 strings See: https://peps.python.org/pep-0508/
Dependencies
~2.1–2.9MB
~57K SLoC