#parser #github #change #basic #strict #cttt

cttt-parser

Parser for github.com/change-this-then-that

3 releases

0.1.2 Aug 10, 2023
0.1.1 Aug 10, 2023
0.1.0 Aug 10, 2023

#759 in Configuration

MIT license

16KB
368 lines

cttt-parser

Crates.io Docs.rs Test Audit

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