macro_rules! literal_matcher_from_pattern {
    ($matcher_name:ident, $regex_pattern:expr) => { ... };
}
Expand description

Helper to implement a struct called $matcher_name that implements MatchLiteral and matches the regex pattern $regex_pattern.

For instance, to match only boolean literals one can create a struct with name BooleanMatcher via

use exmex::{literal_matcher_from_pattern, MatchLiteral};
literal_matcher_from_pattern!(BooleanMatcher, "^(true|false)");