Lines Matching refs:hir
7 use regex_syntax::hir::{self, Hir};
270 use regex_syntax::hir::HirKind::*;
275 Literal(hir::Literal::Unicode(c)) => self.c_char(c),
276 Literal(hir::Literal::Byte(b)) => {
280 Class(hir::Class::Unicode(ref cls)) => self.c_class(cls.ranges()),
281 Class(hir::Class::Bytes(ref cls)) => {
289 char_ranges.push(hir::ClassUnicodeRange::new(s, e));
294 Anchor(hir::Anchor::StartLine) if self.compiled.is_reverse => {
298 Anchor(hir::Anchor::StartLine) => {
302 Anchor(hir::Anchor::EndLine) if self.compiled.is_reverse => {
306 Anchor(hir::Anchor::EndLine) => {
310 Anchor(hir::Anchor::StartText) if self.compiled.is_reverse => {
313 Anchor(hir::Anchor::StartText) => {
316 Anchor(hir::Anchor::EndText) if self.compiled.is_reverse => {
319 Anchor(hir::Anchor::EndText) => {
322 WordBoundary(hir::WordBoundary::Unicode) => {
341 WordBoundary(hir::WordBoundary::UnicodeNegate) => {
355 WordBoundary(hir::WordBoundary::Ascii) => {
359 WordBoundary(hir::WordBoundary::AsciiNegate) => {
364 hir::GroupKind::NonCapturing => self.c(&g.hir),
365 hir::GroupKind::CaptureIndex(index) => {
369 self.c_capture(2 * index as usize, &g.hir)
371 hir::GroupKind::CaptureName { index, ref name } => {
377 self.c_capture(2 * index as usize, &g.hir)
424 self.c(&Hir::repetition(hir::Repetition {
425 kind: hir::RepetitionKind::ZeroOrMore,
427 hir: Box::new(Hir::any(true)),
431 self.c(&Hir::repetition(hir::Repetition {
432 kind: hir::RepetitionKind::ZeroOrMore,
434 hir: Box::new(Hir::any(false)),
449 self.c_class(&[hir::ClassUnicodeRange::new(c, c)])
457 fn c_class(&mut self, ranges: &[hir::ClassUnicodeRange]) -> ResultOrEmpty {
478 self.c_class_bytes(&[hir::ClassBytesRange::new(b, b)])
483 ranges: &[hir::ClassBytesRange],
589 fn c_repeat(&mut self, rep: &hir::Repetition) -> ResultOrEmpty {
590 use regex_syntax::hir::RepetitionKind::*;
592 ZeroOrOne => self.c_repeat_zero_or_one(&rep.hir, rep.greedy),
593 ZeroOrMore => self.c_repeat_zero_or_more(&rep.hir, rep.greedy),
594 OneOrMore => self.c_repeat_one_or_more(&rep.hir, rep.greedy),
595 Range(hir::RepetitionRange::Exactly(min_max)) => {
596 self.c_repeat_range(&rep.hir, rep.greedy, min_max, min_max)
598 Range(hir::RepetitionRange::AtLeast(min)) => {
599 self.c_repeat_range_min_or_more(&rep.hir, rep.greedy, min)
601 Range(hir::RepetitionRange::Bounded(min, max)) => {
602 self.c_repeat_range(&rep.hir, rep.greedy, min, max)
980 ranges: &'b [hir::ClassUnicodeRange],