forked from jasder/antlr
Bug: didn't stop at end of stream during consume()
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9794]
This commit is contained in:
parent
1d6bbb08c3
commit
5c328c7e3f
|
@ -67,9 +67,12 @@ public class CommonTokenStream extends BufferedTokenStream<CommonToken> {
|
|||
if ( p == -1 ) setup();
|
||||
p++;
|
||||
sync(p);
|
||||
while ( tokens.get(p).getChannel()!=channel ) {
|
||||
CommonToken t = tokens.get(p);
|
||||
int n = size();
|
||||
while ( p<n && t.getChannel()!=channel ) {
|
||||
p++;
|
||||
sync(p);
|
||||
t = tokens.get(p);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue