You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
2 years ago | |
|---|---|---|
| .. | ||
| async.rs | 2 years ago | |
| date.rs | 2 years ago | |
| ini.rs | 2 years ago | |
| number.rs | 2 years ago | |
| readme.rs | 2 years ago | |
readme.rs
use combine::{
many1,
parser::char::{letter, space},
sep_by, Parser,
};
#[test]
fn readme() {
main();
}
fn main() {
let word = many1(letter());
let mut parser = sep_by(word, space()).map(|mut words: Vec<String>| words.pop());
let result = parser.parse("Pick up that word!");
assert_eq!(result, Ok((Some("word".to_string()), "!")));
}