chore: checkpoint before Python removal

This commit is contained in:
2026-03-26 22:33:59 +00:00
parent 683cec9307
commit e568ddf82a
29972 changed files with 11269302 additions and 2 deletions

View File

@@ -0,0 +1,28 @@
#[macro_use]
extern crate pest_derive;
extern crate pest;
use pest::Parser;
#[derive(Parser)]
#[grammar = "../examples/help-menu.pest"]
struct HelpMenuGrammar;
const INPUT: &str = r"cli help
cli positional-command <required-single-argument> [optional-single-argument]
cli [choice | of | one | or | none | of | these | options]
cli <choice | of | one | of | these | options>
cli [nesting | <is | ok>]
";
fn main() {
HelpMenuGrammar::parse(Rule::HelpMenu, INPUT)
.expect("Error parsing file")
.next()
.expect("Infallible")
.into_inner()
.filter(|pair| Rule::Command == pair.as_rule())
.for_each(|pair| {
println!("{:#?}", pair);
});
}