Treat any bare word in the command line as a report name

This commit is contained in:
Dustin J. Mitchell
2020-12-29 22:54:07 +00:00
parent 21684666a6
commit 0a458b5f5b
9 changed files with 177 additions and 101 deletions

View File

@@ -30,6 +30,11 @@ pub(super) fn any(input: &str) -> IResult<&str, &str> {
rest(input)
}
/// Recognizes a report name
pub(super) fn report_name(input: &str) -> IResult<&str, &str> {
all_consuming(recognize(pair(alpha1, alphanumeric0)))(input)
}
/// Recognizes a literal string
pub(super) fn literal(literal: &'static str) -> impl Fn(&str) -> IResult<&str, &str> {
move |input: &str| all_consuming(nomtag(literal))(input)