• Home
  • Raw
  • Download

Lines Matching refs:hir

7 use hir::visitor::{self, Visitor};
8 use 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 { printer: self, wtr: wtr }) in print()
86 fn visit_pre(&mut self, hir: &Hir) -> fmt::Result { in visit_pre()
87 match *hir.kind() { in visit_pre()
92 HirKind::Literal(hir::Literal::Unicode(c)) => { in visit_pre()
95 HirKind::Literal(hir::Literal::Byte(b)) => { in visit_pre()
98 HirKind::Class(hir::Class::Unicode(ref cls)) => { in visit_pre()
111 HirKind::Class(hir::Class::Bytes(ref cls)) => { in visit_pre()
124 HirKind::Anchor(hir::Anchor::StartLine) => { in visit_pre()
127 HirKind::Anchor(hir::Anchor::EndLine) => { in visit_pre()
130 HirKind::Anchor(hir::Anchor::StartText) => { in visit_pre()
133 HirKind::Anchor(hir::Anchor::EndText) => { in visit_pre()
136 HirKind::WordBoundary(hir::WordBoundary::Unicode) => { in visit_pre()
139 HirKind::WordBoundary(hir::WordBoundary::UnicodeNegate) => { in visit_pre()
142 HirKind::WordBoundary(hir::WordBoundary::Ascii) => { in visit_pre()
145 HirKind::WordBoundary(hir::WordBoundary::AsciiNegate) => { in visit_pre()
149 hir::GroupKind::CaptureIndex(_) => { in visit_pre()
152 hir::GroupKind::CaptureName { ref name, .. } => { in visit_pre()
155 hir::GroupKind::NonCapturing => { in visit_pre()
163 fn visit_post(&mut self, hir: &Hir) -> fmt::Result { in visit_post()
164 match *hir.kind() { in visit_post()
175 hir::RepetitionKind::ZeroOrOne => { in visit_post()
178 hir::RepetitionKind::ZeroOrMore => { in visit_post()
181 hir::RepetitionKind::OneOrMore => { in visit_post()
184 hir::RepetitionKind::Range(ref x) => match *x { in visit_post()
185 hir::RepetitionRange::Exactly(m) => { in visit_post()
188 hir::RepetitionRange::AtLeast(m) => { in visit_post()
191 hir::RepetitionRange::Bounded(m, n) => { in visit_post()
258 let hir = builder.build().parse(given).unwrap(); localVariable
262 printer.print(&hir, &mut dst).unwrap();