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