Esempio n. 1
0
 private void ReadName(char endChar, char escape, string charsToEscape)
 {
     do
     {
         if ((int)escape == (int)this.reader.Current && this.reader.CanRead && charsToEscape.IndexOf(this.reader.Peek()) != -1)
         {
             int num1 = (int)this.reader.Read();
         }
         int num2 = (int)this.reader.Read();
     }while (!this.reader.End && (int)this.reader.Current != (int)endChar);
     if (this.reader.End)
     {
         throw LexicalException.InvalidName(this.TokenString);
     }
     this.token = Token.Name;
     int num = (int)this.reader.Read();
 }
Esempio n. 2
0
        void ReadName(char endChar, char escape, string charsToEscape)
        {
            do
            {
                if (escape == this.reader.Current &&
                    this.reader.CanRead && //(this.pos + 1 < this.buffer.Length)
                    (charsToEscape.IndexOf(this.reader.Peek()) != -1))
                {
                    this.reader.Read();
                }
                this.reader.Read();
            }while (!this.reader.End && this.reader.Current != endChar); //while (this.pos < this.buffer.Length || this.reader.Current != endChar);

            if (this.reader.End)                                         //if (this.pos >= this.buffer.Length)
            {
                throw LexicalException.InvalidName(this.TokenString);
            }

            this.token = Token.Name;
            this.reader.Read();
        }