예제 #1
0
        /// <summary>
        ///     Advances the Reader by one position and returns the read token
        /// </summary>
        /// <returns></returns>
        public IHlToken GetNext()
        {
            HlParsingTools.ReadAnyOrNone(Tokens, m_CurrentIdx, out IHlToken result);
            m_CurrentIdx++;

            return(result);
        }
예제 #2
0
        /// <summary>
        ///     Peeks into the next (or specified) position relative to the current position
        /// </summary>
        /// <param name="advance">Relative offset to the current position</param>
        /// <returns>Token at the specified Position</returns>
        public IHlToken PeekNext(int advance)
        {
            HlParsingTools.ReadAnyOrNone(Tokens, m_CurrentIdx + advance - 1, out IHlToken result);

            return(result);
        }