Ejemplo n.º 1
0
 public int LineToIndex(LineAndPos pos)
 {
     if (pos is SourcePosAndIndex)
     {
         return((pos as SourcePosAndIndex).OriginalIndex);
     }
     return(_obj.LineToIndex(pos));
 }
Ejemplo n.º 2
0
        public override bool Equals(object obj)
        {
            LineAndPos other = obj as LineAndPos;

            if (other == null)
            {
                return(false);
            }
            return(other._line == _line && other._posInLine == _posInLine);
        }
Ejemplo n.º 3
0
        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);
            }
        }
Ejemplo n.º 4
0
 public int LineToIndex(LineAndPos pos)
 {
     return(-1);
 }