Пример #1
0
        public char AcceptCurrent()
        {
            AssertOnOwnerTask();
            char ch = '\0';

            if (!EndOfFile)
            {
                ch = CurrentCharacter;
                ContentBuffer.Append(CurrentCharacter);
                SkipCurrent();
            }
            return(ch);
        }
Пример #2
0
        public void AcceptTemporaryBuffer()
        {
            AssertOnOwnerTask();
            if (InTemporaryBuffer)
            {
                // Get the buffer
                TemporaryContext context = _temporaryContextStack.Pop();

                // Cancel backtrack
                Source.CancelBacktrack();

                // Append the temporary content to the new current buffer
                ContentBuffer.Append(context.Buffer.ToString());

                // Now just clean up the lookahead context
                context.LookaheadContext.Dispose();
            }
        }
Пример #3
0
 public string Append(string value)
 {
     AssertOnOwnerTask();
     ContentBuffer.Append(value);
     return(value);
 }