コード例 #1
0
        internal void StreamDump(TextWriter sWtr)
        {
            // int indent = sCol;
            int    savePos = buffer.Pos;
            string str     = buffer.GetString(startIndex, endIndex);

            //for (int i = 0; i < indent; i++)
            //    sWtr.Write(' ');
            sWtr.WriteLine(str);
            buffer.Pos = savePos;
            sWtr.Flush();
        }
コード例 #2
0
            public bool MoveNext()
            {
                if (0 > _state)
                {
                    _CheckDisposed();
                    if (_EndOfInput == _state)
                    {
                        return(false);
                    }
                }
                _state = _Enumerating;
                int next;

                do
                {
                    next = Scan();
                } while (next >= int.MaxValue);
                if (-2 == next)
                {
                    _state = _EndOfInput;
                    return(false);
                }
                _current.Line     = tokLin;
                _current.Column   = tokCol + 1;
                _current.Position = tokPos;

                _current.SymbolId = next;
                if (null == tokTxt)
                {
                    tokTxt = buffer.GetString(tokPos, tokEPos);
                }
                _current.Value = tokTxt;
                return(true);
            }
コード例 #3
0
 public override string ToString()
 {
     return(buffer.GetString(startIndex, endIndex));
 }