fixes token's column information

This commit is contained in:
Araq 2013-07-30 08:45:00 +02:00
commit fd2a808266
6 changed files with 19 additions and 21 deletions

View file

@ -205,13 +205,11 @@ proc findClosestCall(n: PNode): PNode =
if result != nil: return
proc isTracked(current: TLineInfo, tokenLen: int): bool =
# the column of an identifier is at its *end*, so we subtract to get the
# start of it.
for i in countup(0, high(checkPoints)):
if current.fileIndex == checkPoints[i].fileIndex:
if current.line == checkPoints[i].line:
let col = checkPoints[i].col
if col >= current.col-tokenLen and col <= current.col:
if col >= current.col and col <= current.col+tokenLen-1:
return true
proc findClosestSym(n: PNode): PNode =