fix off by one error

This commit is contained in:
Aleksey Kladov 2019-02-20 22:27:49 +03:00
parent 2b5e336ce7
commit e72ad0a2fa

View file

@ -17,7 +17,7 @@ impl<'t> TokenSource for ParserInput<'t> {
}
fn is_token_joint_to_next(&self, pos: TokenPos) -> bool {
let idx_curr = pos.0 as usize;
let idx_next = pos.0 as usize;
let idx_next = pos.0 as usize + 1;
if !(idx_next < self.tokens.len()) {
return true;
}