pub trait TokenCount {
// Required method
fn token_count(self) -> usize;
}Expand description
We track the position of the error by counting tokens. This trait is implemented for
references to shadow counted TokenIter, and usize. The later allows to pass in a
position directly or use usize::MAX in case no position data is available (which will
make this error the be the final one when upgrading).
Required Methods§
Sourcefn token_count(self) -> usize
fn token_count(self) -> usize
Get the position of the token iterator.