Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
 private TextSpan CreateSingleTextSpan()
 {
     var pos = new TextPosition(_line, _column);
     return new TextSpan(_filePath, _totalIndex, _index < _count ? 1 : 0, pos, pos);
 }
Ejemplo n.º 3
0
 private void MarkTokenStart()
 {
     _tokenStartIndex = _totalIndex;
     _tokenStartPosition = new TextPosition(_line, _column);
 }