forked from jasder/antlr
format else
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9401]
This commit is contained in:
parent
7f042393d2
commit
c1b77ac6a8
|
@ -153,7 +153,8 @@ public abstract class LookaheadStream<T> extends FastQueue<T> {
|
||||||
for (int i = 0; i < currentElementIndex - index; i++) {
|
for (int i = 0; i < currentElementIndex - index; i++) {
|
||||||
consume();
|
consume();
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
currentElementIndex = index;
|
currentElementIndex = index;
|
||||||
p = index - bufferStartIndex;
|
p = index - bufferStartIndex;
|
||||||
}
|
}
|
||||||
|
@ -163,7 +164,8 @@ public abstract class LookaheadStream<T> extends FastQueue<T> {
|
||||||
int bufferIndex = p - k;
|
int bufferIndex = p - k;
|
||||||
if (bufferIndex == -1) {
|
if (bufferIndex == -1) {
|
||||||
return prevElement;
|
return prevElement;
|
||||||
} else if (bufferIndex >= 0 && bufferIndex < data.size()) {
|
}
|
||||||
|
else if (bufferIndex >= 0 && bufferIndex < data.size()) {
|
||||||
return data.get(bufferIndex);
|
return data.get(bufferIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue