Noop pos counter
This commit is contained in:
parent
04ec6f5acc
commit
1d152cd78f
@ -1,5 +1,6 @@
|
||||
mod index;
|
||||
mod newline;
|
||||
mod nop;
|
||||
|
||||
pub use index::IndexPosCounter;
|
||||
pub use newline::PosLineCol;
|
||||
|
||||
12
default-streams/src/pos/nop.rs
Normal file
12
default-streams/src/pos/nop.rs
Normal file
@ -0,0 +1,12 @@
|
||||
use crate::iterator::PosCounter;
|
||||
pub struct NopPosCounter {}
|
||||
|
||||
impl<C> PosCounter<'static, C, ()> for NopPosCounter {
|
||||
fn update(&mut self, c: C) {}
|
||||
|
||||
fn export(&self) {}
|
||||
|
||||
fn init() -> Self {
|
||||
return NopPosCounter {};
|
||||
}
|
||||
}
|
||||
@ -6,6 +6,7 @@ pub trait Predicate<C> {
|
||||
|
||||
pub trait Pos<'pos> {}
|
||||
|
||||
impl Pos<'static> for () {}
|
||||
impl Pos<'static> for usize {}
|
||||
|
||||
pub trait KeywordComparatorIterator<'keyword, C> {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user