Exemplo n.º 1
0
        private void method_22(char char_3)
        {
            int      num4;
            char     ch;
            char     ch2;
            char     ch4;
            int      index      = this.int_1;
            int      startIndex = this.int_1;
            int      num3       = this.int_1;
            Class190 class2     = null;

            goto Label_0299;
Label_009B:
            ch2 = ch;
            index++;
Label_0211:
            if (class2 == null)
            {
                class2 = this.method_14();
            }
            this.method_23(class2, ch2, num3, num4);
            num3 = index;
Label_0299:
            ch4 = this.char_2[index++];
            if (ch4 > '\r')
            {
                switch (ch4)
                {
                case '"':
                case '\'':
                    if (this.char_2[index - 1] != char_3)
                    {
                        goto Label_0299;
                    }
                    index--;
                    if (startIndex == num3)
                    {
                        this.struct29_0 = new Struct29(this.char_2, startIndex, index - startIndex);
                    }
                    else
                    {
                        if (class2 == null)
                        {
                            class2 = this.method_14();
                        }
                        if (index > num3)
                        {
                            class2.method_1(this.char_2, num3, index - num3);
                        }
                        this.struct29_0 = new Struct29(class2.method_5(), 0, class2.Int32_0);
                    }
                    index++;
                    this.int_1 = index;
                    return;
                }
                if (ch4 != '\\')
                {
                    goto Label_0299;
                }
                this.int_1 = index;
                if (!this.method_20(0, true))
                {
                    this.int_1 = index;
                    throw JsonReaderException.smethod_1(this, "Unterminated string. Expected delimiter: {0}.".smethod_0(CultureInfo.InvariantCulture, char_3));
                }
                num4 = index - 1;
                ch   = this.char_2[index];
                char ch5 = ch;
                if (ch5 > '\\')
                {
                    if (ch5 <= 'f')
                    {
                        if (ch5 != 'b')
                        {
                            if (ch5 != 'f')
                            {
                                goto Label_02F8;
                            }
                            index++;
                            ch2 = '\f';
                        }
                        else
                        {
                            index++;
                            ch2 = '\b';
                        }
                        goto Label_0211;
                    }
                    switch (ch5)
                    {
                    case 'r':
                        index++;
                        ch2 = '\r';
                        goto Label_0211;

                    case 't':
                        index++;
                        ch2 = '\t';
                        goto Label_0211;

                    case 'u':
                        index++;
                        this.int_1 = index;
                        ch2        = this.method_24();
                        if (!Class198.smethod_12(ch2))
                        {
                            if (Class198.smethod_11(ch2))
                            {
                                bool flag;
                                do
                                {
                                    flag = false;
                                    if (!this.method_20(2, true) || ((this.char_2[this.int_1] != '\\') || (this.char_2[this.int_1 + 1] != 'u')))
                                    {
                                        ch2 = 0xfffd;
                                    }
                                    else
                                    {
                                        char ch3 = ch2;
                                        this.int_1 += 2;
                                        ch2         = this.method_24();
                                        if (!Class198.smethod_12(ch2))
                                        {
                                            if (Class198.smethod_11(ch2))
                                            {
                                                ch3  = 0xfffd;
                                                flag = true;
                                            }
                                            else
                                            {
                                                ch3 = 0xfffd;
                                            }
                                        }
                                        if (class2 == null)
                                        {
                                            class2 = this.method_14();
                                        }
                                        this.method_23(class2, ch3, num3, num4);
                                        num3 = this.int_1;
                                    }
                                }while (flag);
                            }
                        }
                        else
                        {
                            ch2 = 0xfffd;
                        }
                        index = this.int_1;
                        goto Label_0211;

                    case 'n':
                        index++;
                        ch2 = '\n';
                        goto Label_0211;
                    }
                    goto Label_02F8;
                }
                if (ch5 <= '\'')
                {
                    switch (ch5)
                    {
                    case '"':
                    case '\'':
                        goto Label_009B;
                    }
                    goto Label_02F8;
                }
                if (ch5 != '/')
                {
                    if (ch5 != '\\')
                    {
                        goto Label_02F8;
                    }
                    index++;
                    ch2 = '\\';
                    goto Label_0211;
                }
                goto Label_009B;
            }
            switch (ch4)
            {
            case '\0':
                if (this.int_0 == (index - 1))
                {
                    index--;
                    if (this.method_18(true) == 0)
                    {
                        this.int_1 = index;
                        throw JsonReaderException.smethod_1(this, "Unterminated string. Expected delimiter: {0}.".smethod_0(CultureInfo.InvariantCulture, char_3));
                    }
                }
                break;

            case '\n':
                this.int_1 = index - 1;
                this.method_33();
                index = this.int_1;
                break;

            case '\r':
                this.int_1 = index - 1;
                this.method_34(true);
                index = this.int_1;
                break;
            }
            goto Label_0299;
Label_02F8:
            index++;
            this.int_1 = index;
            throw JsonReaderException.smethod_1(this, "Bad JSON escape sequence: {0}.".smethod_0(CultureInfo.InvariantCulture, @"\" + ch));
        }