create static method
Implementation
static SingletonPredictionContext create(
PredictionContext? parent,
int returnState,
) {
if (returnState == PredictionContext.EMPTY_RETURN_STATE && parent == null) {
// someone can pass in the bits of an array ctx that mean $
return EmptyPredictionContext.Instance;
}
return SingletonPredictionContext(parent, returnState);
}