public TextSpan(string filePath, int startIndex, int length, TextPosition startPosition, TextPosition endPosition) { //if (filePath == null) throw new ArgumentNullException("filePath"); //if (startIndex < 0) throw new ArgumentOutOfRangeException("startIndex"); //if (length < 0) throw new ArgumentOutOfRangeException("length"); FilePath = filePath; StartIndex = startIndex; Length = length; StartPosition = startPosition; EndPosition = endPosition; }
private TextSpan CreateSingleTextSpan() { var pos = new TextPosition(_line, _column); return new TextSpan(_filePath, _totalIndex, _index < _count ? 1 : 0, pos, pos); }
private void MarkTokenStart() { _tokenStartIndex = _totalIndex; _tokenStartPosition = new TextPosition(_line, _column); }