Beispiel #1
0
        // Token: 0x06001245 RID: 4677 RVA: 0x000833E4 File Offset: 0x000815E4
        protected internal void WriteEscapedOriginalTo(ref Token.Fragment fragment, ITextSink sink)
        {
            int num = fragment.Head;

            if (num != fragment.Tail)
            {
                int num2 = fragment.HeadOffset;
                do
                {
                    Token.RunEntry runEntry = this.RunList[num];
                    if (runEntry.Type == (RunType)2147483648U || runEntry.Type == (RunType)3221225472U)
                    {
                        if (runEntry.Kind == 184549376U && this.Buffer[num2] == '/')
                        {
                            string text = "/**/";
                            for (int i = 0; i < text.Length; i++)
                            {
                                sink.Write((int)text[i]);
                            }
                        }
                        else
                        {
                            this.EscapeAndWriteBuffer(this.Buffer, num2, runEntry.Length, sink);
                        }
                    }
                    num2 += runEntry.Length;
                }while (++num != fragment.Tail && !sink.IsEnough);
            }
        }
Beispiel #2
0
        private bool ExpandRunsArray(int numRuns)
        {
            int num = Math.Min(maxRuns, Math.Max(token.runList.Length * 2, token.whole.tail + numRuns + 1));

            if (num - token.whole.tail < numRuns + 1)
            {
                return(false);
            }
            Token.RunEntry[] array = new Token.RunEntry[num];
            Array.Copy(token.runList, 0, array, 0, token.whole.tail);
            token.runList = array;
            return(true);
        }
Beispiel #3
0
        private bool ExpandRunsArray(int numRuns)
        {
            int newSize = Math.Min(this.maxRuns, Math.Max(this.token.runList.Length * 2, this.token.whole.tail + numRuns + 1));

            if (newSize - this.token.whole.tail < numRuns + 1)
            {
                return(false);
            }

            Token.RunEntry[] newRuns = new Token.RunEntry[newSize];
            Array.Copy(this.token.runList, 0, newRuns, 0, this.token.whole.tail);
            this.token.runList = newRuns;

            return(true);
        }
Beispiel #4
0
        protected internal void WriteEscapedOriginalTo(ref Token.Fragment fragment, ITextSink sink)
        {
            int num = fragment.head;

            if (num != fragment.tail)
            {
                int num2 = fragment.headOffset;
                do
                {
                    Token.RunEntry runEntry = runList[num];
                    if (runEntry.Type == (RunType)2147483648u || runEntry.Type == (RunType)3221225472u)
                    {
                        EscapeAndWriteBuffer(buffer, num2, runEntry.Length, sink);
                    }
                    num2 += runEntry.Length;
                }while (++num != fragment.tail && !sink.IsEnough);
            }
        }