Lines Matching refs:hir
11 use hir::{self, Hir, HirKind};
453 pub fn add_char_class(&mut self, cls: &hir::ClassUnicode) -> bool { in add_char_class()
461 fn add_char_class_reverse(&mut self, cls: &hir::ClassUnicode) -> bool { in add_char_class_reverse()
467 cls: &hir::ClassUnicode, in _add_char_class()
498 pub fn add_byte_class(&mut self, cls: &hir::ClassBytes) -> bool { in add_byte_class()
586 HirKind::Literal(hir::Literal::Unicode(c)) => { in prefixes()
590 HirKind::Literal(hir::Literal::Byte(b)) => { in prefixes()
593 HirKind::Class(hir::Class::Unicode(ref cls)) => { in prefixes()
598 HirKind::Class(hir::Class::Bytes(ref cls)) => { in prefixes()
603 HirKind::Group(hir::Group { ref hir, .. }) => { in prefixes()
604 prefixes(&**hir, lits); in prefixes()
607 hir::RepetitionKind::ZeroOrOne => { in prefixes()
608 repeat_zero_or_one_literals(&x.hir, lits, prefixes); in prefixes()
610 hir::RepetitionKind::ZeroOrMore => { in prefixes()
611 repeat_zero_or_more_literals(&x.hir, lits, prefixes); in prefixes()
613 hir::RepetitionKind::OneOrMore => { in prefixes()
614 repeat_one_or_more_literals(&x.hir, lits, prefixes); in prefixes()
616 hir::RepetitionKind::Range(ref rng) => { in prefixes()
618 hir::RepetitionRange::Exactly(m) => (m, Some(m)), in prefixes()
619 hir::RepetitionRange::AtLeast(m) => (m, None), in prefixes()
620 hir::RepetitionRange::Bounded(m, n) => (m, Some(n)), in prefixes()
623 &x.hir, min, max, x.greedy, lits, prefixes, in prefixes()
631 if let HirKind::Anchor(hir::Anchor::StartText) = *e.kind() { in prefixes()
659 HirKind::Literal(hir::Literal::Unicode(c)) => { in suffixes()
666 HirKind::Literal(hir::Literal::Byte(b)) => { in suffixes()
669 HirKind::Class(hir::Class::Unicode(ref cls)) => { in suffixes()
674 HirKind::Class(hir::Class::Bytes(ref cls)) => { in suffixes()
679 HirKind::Group(hir::Group { ref hir, .. }) => { in suffixes()
680 suffixes(&**hir, lits); in suffixes()
683 hir::RepetitionKind::ZeroOrOne => { in suffixes()
684 repeat_zero_or_one_literals(&x.hir, lits, suffixes); in suffixes()
686 hir::RepetitionKind::ZeroOrMore => { in suffixes()
687 repeat_zero_or_more_literals(&x.hir, lits, suffixes); in suffixes()
689 hir::RepetitionKind::OneOrMore => { in suffixes()
690 repeat_one_or_more_literals(&x.hir, lits, suffixes); in suffixes()
692 hir::RepetitionKind::Range(ref rng) => { in suffixes()
694 hir::RepetitionRange::Exactly(m) => (m, Some(m)), in suffixes()
695 hir::RepetitionRange::AtLeast(m) => (m, None), in suffixes()
696 hir::RepetitionRange::Bounded(m, n) => (m, Some(n)), in suffixes()
699 &x.hir, min, max, x.greedy, lits, suffixes, in suffixes()
707 if let HirKind::Anchor(hir::Anchor::EndText) = *e.kind() { in suffixes()
794 &Hir::repetition(hir::Repetition { in repeat_range_literals()
795 kind: hir::RepetitionKind::ZeroOrMore, in repeat_range_literals()
797 hir: Box::new(e.clone()), in repeat_range_literals()
965 fn cls_char_count(cls: &hir::ClassUnicode) -> usize { in cls_char_count()
970 fn cls_byte_count(cls: &hir::ClassBytes) -> usize { in cls_byte_count()
980 use hir::Hir;