public int LineToIndex(LineAndPos pos) { if (pos is SourcePosAndIndex) { return((pos as SourcePosAndIndex).OriginalIndex); } return(_obj.LineToIndex(pos)); }
public override bool Equals(object obj) { LineAndPos other = obj as LineAndPos; if (other == null) { return(false); } return(other._line == _line && other._posInLine == _posInLine); }
public int LineToIndex(LineAndPos pos) { int lineIndex = LineToIndex(pos.Line); if (pos.PosInLine > 0) { lineIndex += pos.PosInLine - 1; } if (_startingPos != null && pos.Line == _startingPos.Line) { return(lineIndex + (_startingPos.PosInLine - 1)); } else { return(lineIndex); } }
public int LineToIndex(LineAndPos pos) { return(-1); }