Wax restricts the use of literals containing ',' and ':' because of their use on Alternatives and Repetitions and the fact that they recurse on glob, but it restricts literals unnecessarily with such characters.
I believe that literal should be parametrized with the restriction on those characters only when they are in use by the expression, making escaping optional when they are not in use.
Today a literal like this will break without scaping:
Glob::new("extra:dots.txt").unwrap();
Causing the following error:
panicked at 'called `Result::unwrap()` on an `Err` value: BuildError { kind: Parse(ParseError { expression: "extra:dots.txt", locations: [ErrorEntry { fragment: ":dots.txt", location: 5, kind: Nom(Eof) }] }) }'
Wax restricts the use of literals containing ',' and ':' because of their use on Alternatives and Repetitions and the fact that they recurse on
glob
, but it restricts literals unnecessarily with such characters.I believe that
literal
should be parametrized with the restriction on those characters only when they are in use by the expression, making escaping optional when they are not in use.Today a literal like this will break without scaping:
Causing the following error: