summary refs log tree commit diff stats
path: root/compiler/nimlexbase.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/nimlexbase.nim')
-rw-r--r--compiler/nimlexbase.nim10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/nimlexbase.nim b/compiler/nimlexbase.nim
index af2ae64a3..6132e6f66 100644
--- a/compiler/nimlexbase.nim
+++ b/compiler/nimlexbase.nim
@@ -162,9 +162,9 @@ proc getColNumber(L: TBaseLexer, pos: int): int =
 proc getCurrentLine(L: TBaseLexer, marker: bool = true): string =
   result = ""
   var i = L.lineStart
-  while not (L.buf[i] in {CR, LF, EndOfFile}):
-    result.add(L.buf[i])
-    inc(i)
-  result.add("\n")
+  while L.buf[i] notin {CR, LF, EndOfFile}:
+    result.add L.buf[i]
+    inc i
+  result.add "\n"
   if marker:
-    result.add(spaces(getColNumber(L, L.bufpos)) & '^' & "\n")
+    result.add spaces(getColNumber(L, L.bufpos)) & '^' & "\n"