summary refs log tree commit diff stats
path: root/compiler/renderer.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-05-27 15:22:17 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-05-27 15:22:17 +0200
commit18a3833d6085ae4edf28433ba12a27a4be3ae3b1 (patch)
treea4dc15d24b03c7657b15fdf5e5da0e087b6347f5 /compiler/renderer.nim
parentdd8a6ef3a2aa1f0200d6ddff0f1f38532e84647b (diff)
downloadNim-18a3833d6085ae4edf28433ba12a27a4be3ae3b1.tar.gz
more refactoring
Diffstat (limited to 'compiler/renderer.nim')
-rw-r--r--compiler/renderer.nim5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/renderer.nim b/compiler/renderer.nim
index 748cf9d1c..e209112e8 100644
--- a/compiler/renderer.nim
+++ b/compiler/renderer.nim
@@ -330,14 +330,15 @@ proc ulitAux(g: TSrcGen; n: PNode, x: BiggestInt, size: int): string =
 
 proc atom(g: TSrcGen; n: PNode): string =
   when defined(nimpretty):
+    doAssert g.config != nil, "g.config not initialized!"
     let comment = if n.info.commentOffsetA < n.info.commentOffsetB:
-                    " " & fileSection(g.fid, n.info.commentOffsetA, n.info.commentOffsetB)
+                    " " & fileSection(g.config, g.fid, n.info.commentOffsetA, n.info.commentOffsetB)
                   else:
                     ""
     if n.info.offsetA <= n.info.offsetB:
       # for some constructed tokens this can not be the case and we're better
       # off to not mess with the offset then.
-      return fileSection(g.fid, n.info.offsetA, n.info.offsetB) & comment
+      return fileSection(g.config, g.fid, n.info.offsetA, n.info.offsetB) & comment
   var f: float32
   case n.kind
   of nkEmpty: result = ""