use super::super::ShiftOr;
pub struct ShiftOrInterpreter<'a> {
shift_or: &'a ShiftOr,
}
impl<'a> ShiftOrInterpreter<'a> {
pub fn new(shift_or: &'a ShiftOr) -> Self {
Self { shift_or }
}
#[inline]
pub fn is_match(&self, input: &[u8]) -> bool {
self.shift_or.is_match(input)
}
#[inline]
pub fn find(&self, input: &[u8]) -> Option<(usize, usize)> {
self.shift_or.find(input)
}
#[inline]
pub fn find_at(&self, input: &[u8], pos: usize) -> Option<(usize, usize)> {
self.shift_or.find_at(input, pos)
}
#[inline]
pub fn try_match_at(&self, input: &[u8], pos: usize) -> Option<(usize, usize)> {
self.shift_or.try_match_at(input, pos)
}
}