[svn] r7778: nemerle/trunk/ncc/completion/CodeCompletionEngine.n
kliss
svnadmin at nemerle.org
Wed Aug 29 09:01:53 CEST 2007
Log:
Revert local symbols renaming
Author: kliss
Date: Wed Aug 29 09:01:51 2007
New Revision: 7778
Modified:
nemerle/trunk/ncc/completion/CodeCompletionEngine.n
Modified: nemerle/trunk/ncc/completion/CodeCompletionEngine.n
==============================================================================
--- nemerle/trunk/ncc/completion/CodeCompletionEngine.n (original)
+++ nemerle/trunk/ncc/completion/CodeCompletionEngine.n Wed Aug 29 09:01:51 2007
@@ -70,7 +70,6 @@
}
// Relocation
-
public interface ISupportRelocation
{
RelocateImpl (info : RelocationInfo/*, ident : string*/) : void;
@@ -110,23 +109,22 @@
/// Shift Location.
public Relocate (loc : Location, info : RelocationInfo) : Location
{
- // K-Liss: Why passing "info" here as a parameter? It captures parent parameter, doesn't it?
- def relocatePoint (oldLine, oldColumn, info, column)
+ def relocatePoint (oldLn, oldCh, info, ch)
{
- if (oldLine > info.Line)
- (oldLine + info.LineOffset, oldColumn)
- else if (oldLine == info.Line && oldColumn >= column)
- (oldLine + info.LineOffset, oldColumn + info.CharOffset)
+ if (oldLn > info.Line)
+ (oldLn + info.LineOffset, oldCh)
+ else if (oldLn == info.Line && oldCh >= ch)
+ (oldLn + info.LineOffset, oldCh + info.CharOffset)
else
- (oldLine, oldColumn)
+ (oldLn, oldCh)
}
if (loc.FileIndex == info.FileIndex)
{
- def (newLine, newColumn) = relocatePoint(loc.Line, loc.Column, info, info.Char + 1);
- def (newEndLine, newEndColumn) = relocatePoint(loc.EndLine, loc.EndColumn, info, info.Char);
+ def (newLn, newCh) = relocatePoint(loc.Line, loc.Column, info, info.Char + 1);
+ def (newEndLn, newEndCh) = relocatePoint(loc.EndLine, loc.EndColumn, info, info.Char);
- Location (loc, newLine, newColumn, newEndLine, newEndColumn);
+ Location (loc, newLn, newCh, newEndLn, newEndCh);
}
else
loc
@@ -142,22 +140,22 @@
}
/// Shift Location.
- public Relocate (loc : Location, line : int, column : int, lineOffset : int, colOffset : int) : Location
+ public Relocate (loc : Location, line : int, ch : int, lineOffset : int, chOffset : int) : Location
{
- def relocatePoint (oldLine, oldColumn, column)
+ def relocatePoint (oldLn, oldCh, ch)
{
- if (oldLine > line)
- (oldLine + lineOffset, oldColumn)
- else if (oldLine == line && oldColumn >= column)
- (oldLine + lineOffset, oldColumn + colOffset)
+ if (oldLn > line)
+ (oldLn + lineOffset, oldCh)
+ else if (oldLn == line && oldCh >= ch)
+ (oldLn + lineOffset, oldCh + chOffset)
else
- (oldLine, oldColumn)
+ (oldLn, oldCh)
}
- def (newLine, newColumn) = relocatePoint(loc.Line, loc.Column, column + 1);
- def (newEndLine, newEndColumn) = relocatePoint(loc.EndLine, loc.EndColumn, column);
+ def (newLn, newCh) = relocatePoint(loc.Line, loc.Column, ch + 1);
+ def (newEndLn, newEndCh) = relocatePoint(loc.EndLine, loc.EndColumn, ch);
- Location (loc.FileIndex, newLine, newColumn, newEndLine, newEndColumn);
+ Location (loc.FileIndex, newLn, newCh, newEndLn, newEndCh);
}
CmpOptions = System.StringComparison.InvariantCultureIgnoreCase;
More information about the svn
mailing list