meli/ui/src/execute/mod.rs

21 lines
428 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.
*/
use std;
2018-07-24 20:20:32 +03:00
use nom::{digit, };
named!(usize_c<usize>,
2018-07-18 10:42:52 +03:00
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
*/