doc parsing events

This commit is contained in:
csmoe 2019-01-01 16:09:51 +08:00
parent b01e707dba
commit df591a1e48
4 changed files with 71 additions and 43 deletions

View file

@ -70,7 +70,7 @@ impl<'t> ParserInput<'t> {
self.start_offsets[idx]
}
/// Get the raw text of a toen at given input position.
/// Get the raw text of a token at given input position.
pub fn token_text(&self, pos: InputPosition) -> &'t str {
let idx = pos.0 as usize;
if !(idx < self.tokens.len()) {