remove dependency on winnow
This commit is contained in:
parent
1b6d2a9b62
commit
3cca2bc2cc
4 changed files with 0 additions and 31 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue