Load all fixture grammars dynamically

This way the build doesn't take forever any time a single grammar has 
been regenerated.
This commit is contained in:
Max Brunsfeld 2019-01-15 10:27:39 -08:00
parent 5c3c1dd0bd
commit a8292f4fe9
10 changed files with 119 additions and 143 deletions

View file

@ -55,10 +55,6 @@ impl CharacterSet {
CharacterSet::Include(Vec::new())
}
pub fn all() -> Self {
CharacterSet::Exclude(Vec::new())
}
pub fn negate(self) -> CharacterSet {
match self {
CharacterSet::Include(chars) => CharacterSet::Exclude(chars),
@ -182,6 +178,7 @@ impl CharacterSet {
}
}
#[cfg(test)]
pub fn contains(&self, c: char) -> bool {
match self {
CharacterSet::Include(chars) => chars.contains(&c),