Skip to main content

oni_comb_parser/text/
whitespace.rs

1use crate::text::take_while0::{take_while0, TakeWhile0};
2use crate::text::take_while1::{take_while1, TakeWhile1};
3
4fn is_ws(c: char) -> bool {
5  c.is_ascii_whitespace()
6}
7
8pub fn whitespace0() -> TakeWhile0<fn(char) -> bool> {
9  take_while0(is_ws as fn(char) -> bool)
10}
11
12pub fn whitespace1() -> TakeWhile1<fn(char) -> bool> {
13  take_while1(is_ws as fn(char) -> bool)
14}