예제 #1
0
 public StringReader(string sourceCode)
 {
     _charBuffer = sourceCode.ToCharArray();
     _currentPosition = new TextPosition
     {
         CharIndex = 0,
         LineNo = 1,
         ColNo = 1
     };
 }
예제 #2
0
 public string Substr(TextPosition start, TextPosition end)
 {
     return new string(_charBuffer, start.CharIndex, end.CharIndex - start.CharIndex);
 }