• Home
  • Raw
  • Download

Lines Matching refs:hir

7 use crate::hir::visitor::{self, Visitor};
8 use crate::hir::{self, Hir, HirKind};
67 pub fn print<W: fmt::Write>(&mut self, hir: &Hir, wtr: W) -> fmt::Result { in print()
68 visitor::visit(hir, Writer { wtr }) in print()
85 fn visit_pre(&mut self, hir: &Hir) -> fmt::Result { in visit_pre()
86 match *hir.kind() { in visit_pre()
91 HirKind::Literal(hir::Literal::Unicode(c)) => { in visit_pre()
94 HirKind::Literal(hir::Literal::Byte(b)) => { in visit_pre()
97 HirKind::Class(hir::Class::Unicode(ref cls)) => { in visit_pre()
110 HirKind::Class(hir::Class::Bytes(ref cls)) => { in visit_pre()
123 HirKind::Anchor(hir::Anchor::StartLine) => { in visit_pre()
126 HirKind::Anchor(hir::Anchor::EndLine) => { in visit_pre()
129 HirKind::Anchor(hir::Anchor::StartText) => { in visit_pre()
132 HirKind::Anchor(hir::Anchor::EndText) => { in visit_pre()
135 HirKind::WordBoundary(hir::WordBoundary::Unicode) => { in visit_pre()
138 HirKind::WordBoundary(hir::WordBoundary::UnicodeNegate) => { in visit_pre()
141 HirKind::WordBoundary(hir::WordBoundary::Ascii) => { in visit_pre()
144 HirKind::WordBoundary(hir::WordBoundary::AsciiNegate) => { in visit_pre()
148 hir::GroupKind::CaptureIndex(_) => { in visit_pre()
151 hir::GroupKind::CaptureName { ref name, .. } => { in visit_pre()
154 hir::GroupKind::NonCapturing => { in visit_pre()
162 fn visit_post(&mut self, hir: &Hir) -> fmt::Result { in visit_post()
163 match *hir.kind() { in visit_post()
174 hir::RepetitionKind::ZeroOrOne => { in visit_post()
177 hir::RepetitionKind::ZeroOrMore => { in visit_post()
180 hir::RepetitionKind::OneOrMore => { in visit_post()
183 hir::RepetitionKind::Range(ref x) => match *x { in visit_post()
184 hir::RepetitionRange::Exactly(m) => { in visit_post()
187 hir::RepetitionRange::AtLeast(m) => { in visit_post()
190 hir::RepetitionRange::Bounded(m, n) => { in visit_post()
257 let hir = builder.build().parse(given).unwrap(); localVariable
261 printer.print(&hir, &mut dst).unwrap();