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:
parent
5c3c1dd0bd
commit
a8292f4fe9
10 changed files with 119 additions and 143 deletions
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue