// Token: 0x0600432D RID: 17197 RVA: 0x000F8254 File Offset: 0x000F6454
    private global::dfMarkupToken parseTag()
    {
        if (this.Peek(0) != '[')
        {
            return(null);
        }
        char c = this.Peek(1);

        if (c == '/')
        {
            return(this.parseEndTag());
        }
        this.Advance(1);
        c = this.Peek(0);
        if (!char.IsLetterOrDigit(c))
        {
            return(null);
        }
        int startIndex = this.index;
        int num        = this.index;

        while (this.index < this.source.Length && char.IsLetterOrDigit(this.Advance(1)))
        {
            num++;
        }
        global::dfMarkupToken dfMarkupToken = global::dfMarkupToken.Obtain(this.source, global::dfMarkupTokenType.StartTag, startIndex, num);

        if (this.index < this.source.Length && this.Peek(0) != ']')
        {
            c = this.Peek(0);
            if (char.IsWhiteSpace(c))
            {
                this.parseWhitespace();
            }
            int startIndex2 = this.index;
            int num2        = this.index;
            if (this.Peek(0) == '"')
            {
                global::dfMarkupToken dfMarkupToken2 = this.parseQuotedString();
                dfMarkupToken.AddAttribute(dfMarkupToken2, dfMarkupToken2);
            }
            else
            {
                while (this.index < this.source.Length && this.Advance(1) != ']')
                {
                    num2++;
                }
                global::dfMarkupToken dfMarkupToken3 = global::dfMarkupToken.Obtain(this.source, global::dfMarkupTokenType.Text, startIndex2, num2);
                dfMarkupToken.AddAttribute(dfMarkupToken3, dfMarkupToken3);
            }
        }
        if (this.Peek(0) == ']')
        {
            this.Advance(1);
        }
        return(dfMarkupToken);
    }
Пример #2
0
    // Token: 0x0600431D RID: 17181 RVA: 0x000F7B24 File Offset: 0x000F5D24
    private global::dfMarkupToken parseTag()
    {
        if (this.Peek(0) != '<')
        {
            return(null);
        }
        char c = this.Peek(1);

        if (c == '/')
        {
            return(this.parseEndTag());
        }
        this.Advance(1);
        c = this.Peek(0);
        if (!char.IsLetterOrDigit(c))
        {
            return(null);
        }
        int startIndex = this.index;
        int num        = this.index;

        while (this.index < this.source.Length && char.IsLetterOrDigit(this.Advance(1)))
        {
            num++;
        }
        global::dfMarkupToken dfMarkupToken = global::dfMarkupToken.Obtain(this.source, global::dfMarkupTokenType.StartTag, startIndex, num);

        while (this.index < this.source.Length && this.Peek(0) != '>')
        {
            c = this.Peek(0);
            if (char.IsWhiteSpace(c))
            {
                this.parseWhitespace();
            }
            else
            {
                global::dfMarkupToken dfMarkupToken2 = this.parseWord();
                if (dfMarkupToken2 == null)
                {
                    this.Advance(1);
                }
                else
                {
                    c = this.Peek(0);
                    if (c != '=')
                    {
                        dfMarkupToken.AddAttribute(dfMarkupToken2, dfMarkupToken2);
                    }
                    else
                    {
                        c = this.Advance(1);
                        global::dfMarkupToken dfMarkupToken3;
                        if (c == '"' || c == '\'')
                        {
                            dfMarkupToken3 = this.parseQuotedString();
                        }
                        else
                        {
                            dfMarkupToken3 = this.parseAttributeValue();
                        }
                        dfMarkupToken.AddAttribute(dfMarkupToken2, dfMarkupToken3 ?? dfMarkupToken2);
                    }
                }
            }
        }
        if (this.Peek(0) == '>')
        {
            this.Advance(1);
        }
        return(dfMarkupToken);
    }