Exemplo n.º 1
0
 /* Function: NextPastWhitespace
  * Moves forward until past all whitespace tokens or the limit is reached.
  */
 public void NextPastWhitespace(SimpleTokenIterator limit)
 {
     while (FundamentalType == FundamentalType.Whitespace && this < limit)
     {
         Next();
     }
 }
Exemplo n.º 2
0
        /* Function: MatchesToken
         * Returns whether the current token matches the one at the passed iterator.  Returns false if either iterator
         * is out of bounds.
         */
        public bool MatchesToken(SimpleTokenIterator other, bool ignoreCase = false)
        {
            if (!IsInBounds || !other.IsInBounds)
            {
                return(false);
            }

            return(tokenLength == other.tokenLength &&
                   String.Compare(rawText, rawTextIndex, other.rawText, other.RawTextIndex,
                                  tokenLength, ignoreCase) == 0);
        }