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
|
||||
public boolean isEmpty() {
|
||||
return size()==1 &&
|
||||
returnStates[0]==EMPTY_RETURN_STATE;
|
||||
// since EMPTY_RETURN_STATE can only appear in the last position, we
|
||||
// don't need to verify that size==1
|
||||
return returnStates[0]==EMPTY_RETURN_STATE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue