Crate rust_regex_dsl_creator
source ·Expand description
This crate can be used to create a regular expression DSL (see here). To use it, run something like:
use rust_regex_dsl_creator::ToDsl;
let dsl = "[a-z]+".to_dsl().unwrap();
assert_eq!(dsl, "repeat {\n any_of {\n from: 'a', to: 'z',\n },\n}\n")
Traits§
- Import this trait to enable the
to_dsl
function for anything that implements the ToString trait.