Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
async.rs | D | 03-May-2024 | 6.2 KiB | 190 | 135 | |
date.rs | D | 03-May-2024 | 5.4 KiB | 236 | 199 | |
ini.rs | D | 03-May-2024 | 4.7 KiB | 180 | 153 | |
number.rs | D | 03-May-2024 | 802 | 34 | 28 | |
readme.rs | D | 03-May-2024 | 369 | 19 | 15 |
readme.rs
1 use combine::{ 2 many1, 3 parser::char::{letter, space}, 4 sep_by, Parser, 5 }; 6 7 #[test] readme()8fn readme() { 9 main(); 10 } 11 main()12fn main() { 13 let word = many1(letter()); 14 15 let mut parser = sep_by(word, space()).map(|mut words: Vec<String>| words.pop()); 16 let result = parser.parse("Pick up that word!"); 17 assert_eq!(result, Ok((Some("word".to_string()), "!"))); 18 } 19