3 releases
0.1.2 | Aug 10, 2023 |
---|---|
0.1.1 | Aug 10, 2023 |
0.1.0 | Aug 10, 2023 |
#759 in Configuration
16KB
368 lines
cttt-parser
A parser for the Change This Then That.
Examples
Basic usage:
let s = "
// @cttt.name(foo)
let x = 1;
// @cttt.change(bar)
// @cttt.name(bar)
let y = 2;
// @cttt.change(foo)
";
println!("{:#?}", cttt_parser::parse(s));
Strict usage:
let s = "
// @cttt.name(foo)
let x = 1;
// @cttt.change(bar)
// @cttt.name(bar)
let y = 2;
// @cttt.change(foo)
";
println!(
"{:#?}",
cttt_parser::parse_strict(s, vec!["name".to_string(), "change".to_string()])
);
Dependencies
~2.2–3MB
~62K SLoC