summary refs log tree commit diff stats
path: root/lib/lexbase.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lexbase.nim')
-rw-r--r--lib/lexbase.nim3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/lexbase.nim b/lib/lexbase.nim
index ea9a61821..f6861a5b6 100644
--- a/lib/lexbase.nim
+++ b/lib/lexbase.nim
@@ -151,8 +151,7 @@ proc open(L: var TBaseLexer, input: PStream, bufLen: int = 8192) =
   skip_UTF_8_BOM(L)
 
 proc getColNumber(L: TBaseLexer, pos: int): int =
-  result = pos - L.lineStart
-  assert(result >= 0)
+  result = abs(pos - L.lineStart)
 
 proc getCurrentLine(L: TBaseLexer, marker: bool = true): string =
   var i: int