forked from jasder/antlr
Simplify ArrayPredictionContext.isEmpty()
This commit is contained in:
parent
dbe1390c6f
commit
89a251e497
|
@ -59,8 +59,9 @@ public class ArrayPredictionContext extends PredictionContext {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEmpty() {
|
public boolean isEmpty() {
|
||||||
return size()==1 &&
|
// since EMPTY_RETURN_STATE can only appear in the last position, we
|
||||||
returnStates[0]==EMPTY_RETURN_STATE;
|
// don't need to verify that size==1
|
||||||
|
return returnStates[0]==EMPTY_RETURN_STATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue