Skip to content

Commit

Permalink
fix #1177 (LB(k) stops at index 0) @antlr/antlr-targets might care ab…
Browse files Browse the repository at this point in the history
…out this
  • Loading branch information
parrt committed Dec 10, 2016
1 parent 9ef7560 commit 0a7e90f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ protected Token LB(int k) {
int i = p;
int n = 1;
// find k good tokens looking backwards
while ( n<=k ) {
while ( n<=k && i>0 ) {
// skip off-channel tokens
i = previousTokenOnChannel(i - 1, channel);
n++;
Expand Down

0 comments on commit 0a7e90f

Please sign in to comment.