summary refs log tree commit diff stats
path: root/tools
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 /tools
parentdd8a6ef3a2aa1f0200d6ddff0f1f38532e84647b (diff)
downloadNim-18a3833d6085ae4edf28433ba12a27a4be3ae3b1.tar.gz
more refactoring
Diffstat (limited to 'tools')
-rw-r--r--tools/nimpretty.nim7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/nimpretty.nim b/tools/nimpretty.nim
index 396f17b0b..386eddfde 100644
--- a/tools/nimpretty.nim
+++ b/tools/nimpretty.nim
@@ -12,7 +12,7 @@
 when not defined(nimpretty):
   {.error: "This needs to be compiled with --define:nimPretty".}
 
-import ../compiler / [idents, msgs, ast, syntaxes, renderer]
+import ../compiler / [idents, msgs, ast, syntaxes, renderer, options]
 
 import parseopt, strutils, os
 
@@ -40,8 +40,9 @@ proc writeVersion() =
   quit(0)
 
 proc prettyPrint(infile: string) =
-  let fileIdx = fileInfoIdx(infile)
-  let tree = parseFile(fileIdx, newIdentCache())
+  let conf = newConfigRef()
+  let fileIdx = fileInfoIdx(conf, infile)
+  let tree = parseFile(fileIdx, newIdentCache(), conf)
   let outfile = changeFileExt(infile, ".pretty.nim")
   renderModule(tree, infile, outfile, {}, fileIdx)