meli/ui/src/execute/mod.rs

25 lines
448 B
Rust
Raw Normal View History

2018-07-18 10:42:52 +03:00
/*! A parser module for user commands passed through the Ex mode.
*/
2018-07-27 21:37:56 +03:00
use nom::digit;
use std;
2018-07-27 21:37:56 +03:00
named!(
usize_c<usize>,
map_res!(
map_res!(ws!(digit), std::str::from_utf8),
std::str::FromStr::from_str
)
);
named!(pub goto<usize>,
2018-07-21 11:20:13 +03:00
preceded!(tag!("b "),
call!(usize_c))
);
2018-07-24 20:20:32 +03:00
/*
2018-07-21 11:20:13 +03:00
named!(pub sort<&str>,
preceded!(tag!("sort "),
map_res!(call!(alpha), std::str::from_utf8))
2018-07-18 10:42:52 +03:00
);
2018-07-24 20:20:32 +03:00
*/