Antlr4.Runtime.BufferedTokenStream.Get C# (CSharp) Method

Get() public method

Get all tokens from start..stop inclusively.
Get all tokens from start..stop inclusively.
public Get ( int start, int stop ) : IList
start int
stop int
return IList
        public virtual IList<IToken> Get(int start, int stop)
        {
            if (start < 0 || stop < 0)
            {
                return null;
            }
            LazyInit();
            IList<IToken> subset = new List<IToken>();
            if (stop >= tokens.Count)
            {
                stop = tokens.Count - 1;
            }
            for (int i = start; i <= stop; i++)
            {
                IToken t = tokens[i];
                if (t.Type == TokenConstants.EOF)
                {
                    break;
                }
                subset.Add(t);
            }
            return subset;
        }

Same methods

BufferedTokenStream::Get ( int i ) : IToken