Antlr4.Runtime.Atn.ArrayPredictionContext.AddEmptyContext C# (CSharp) Method

AddEmptyContext() protected method

protected AddEmptyContext ( ) : PredictionContext
return PredictionContext
        protected internal override PredictionContext AddEmptyContext()
        {
            if (HasEmpty)
            {
                return this;
            }
            PredictionContext[] parents2 = Arrays.CopyOf(parents, parents.Length + 1);
            int[] returnStates2 = Arrays.CopyOf(returnStates, returnStates.Length + 1);
            parents2[parents2.Length - 1] = PredictionContext.EmptyFull;
            returnStates2[returnStates2.Length - 1] = PredictionContext.EmptyFullStateKey;
            return new Antlr4.Runtime.Atn.ArrayPredictionContext(parents2, returnStates2);
        }