private static INfa CharacterClass(RegexCharacterClass characterClass, bool negate) { switch (characterClass.NodeType) { case RegexNodeType.RegexCharacterClass: return UnitRange(characterClass.CharacterRange, negate); case RegexNodeType.RegexCharacterClassAlteration: var alteration = characterClass as RegexCharacterClassAlteration; return Union( UnitRange(alteration.CharacterRange, negate), CharacterClass(alteration.CharacterClass, negate)); } throw new InvalidOperationException("Unreachable code detected."); }
public RegexSet(RegexCharacterClass characterClass, bool negate) { Negate = negate; CharacterClass = characterClass; this.hashCode = ComputeHashCode(); }
public RegexSet(bool negate, RegexCharacterClass characterClass) { Negate = negate; CharacterClass = characterClass; _hashCode = ComputeHashCode(); }
public RegexCharacterClassAlteration(RegexCharacters characterRange, RegexCharacterClass characterClass) : base(characterRange) { CharacterClass = characterClass; }