mirror of
https://forge.katzen.cafe/katzen-cafe/iowo.git
synced 2024-11-05 15:26:24 +01:00
remove dependency on winnow
This commit is contained in:
parent
1b6d2a9b62
commit
3cca2bc2cc
16
Cargo.lock
generated
16
Cargo.lock
generated
|
@ -56,19 +56,12 @@ dependencies = [
|
|||
"logos-codegen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "2.6.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167"
|
||||
|
||||
[[package]]
|
||||
name = "pipeline-lang"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"codespan-reporting",
|
||||
"logos",
|
||||
"winnow",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -157,12 +150,3 @@ name = "winapi-x86_64-pc-windows-gnu"
|
|||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||
|
||||
[[package]]
|
||||
name = "winnow"
|
||||
version = "0.5.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
|
|
@ -6,6 +6,5 @@ edition = "2021"
|
|||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
winnow = "0.5"
|
||||
logos = "0.13"
|
||||
codespan-reporting = "0.11"
|
||||
|
|
|
@ -8,7 +8,6 @@ use crate::syntax::check::check;
|
|||
|
||||
mod lexer;
|
||||
mod syntax;
|
||||
mod utils;
|
||||
|
||||
fn main() {
|
||||
let mut files = SimpleFiles::new();
|
||||
|
|
13
src/utils.rs
13
src/utils.rs
|
@ -1,13 +0,0 @@
|
|||
use winnow::ascii::space0;
|
||||
// from https://docs.rs/winnow/latest/winnow/_topic/language/index.html#whitespace
|
||||
use winnow::prelude::*;
|
||||
use winnow::{ascii::multispace0, combinator::delimited, error::ParserError};
|
||||
|
||||
/// A combinator that takes a parser `inner` and produces a parser that also consumes both leading and
|
||||
/// trailing whitespace, returning the output of `inner`.
|
||||
pub fn ws<'a, F, O, E: ParserError<&'a str>>(inner: F) -> impl Parser<&'a str, O, E>
|
||||
where
|
||||
F: Parser<&'a str, O, E>,
|
||||
{
|
||||
delimited(space0, inner, space0)
|
||||
}
|
Loading…
Reference in a new issue