blob: 9b481f4322c0e5f9807f3fc40859d11904f84712 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
/*! A parser module for user commands passed through the Ex mode.
*/
use std;
use nom::{digit, alpha};
named!(usize_c<usize>,
map_res!(map_res!(ws!(digit), std::str::from_utf8), std::str::FromStr::from_str));
named!(pub goto<usize>,
preceded!(tag!("b "),
call!(usize_c))
);
named!(pub sort<&str>,
preceded!(tag!("sort "),
map_res!(call!(alpha), std::str::from_utf8))
);
|