summary refs log tree commit diff stats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/nimpretty.nim5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/nimpretty.nim b/tools/nimpretty.nim
index 2c967b1e8..36d1382cf 100644
--- a/tools/nimpretty.nim
+++ b/tools/nimpretty.nim
@@ -42,7 +42,8 @@ proc writeVersion() =
 proc prettyPrint(infile: string) =
   let fileIdx = fileInfoIdx(infile)
   let tree = parseFile(fileIdx, newIdentCache())
-  renderModule(tree, infile, {})
+  let outfile = changeFileExt(infile, ".pretty.nim")
+  renderModule(tree, infile, outfile, {})
 
 proc main =
   var infile: string
@@ -50,7 +51,7 @@ proc main =
   for kind, key, val in getopt():
     case kind
     of cmdArgument:
-      infile = key
+      infile = key.addFileExt(".nim")
     of cmdLongoption, cmdShortOption:
       case normalize(key)
       of "help", "h": writeHelp()
ter Araq <rumpf_a@web.de> 2011-12-30 11:03:01 +0100 GC stack scanning cares about interior pointers' href='/ahoang/Nim/commit/lib/system/avltree.nim?h=devel&id=73919e3082e3bd7905f9a11a33fc54d641a10ac7'>73919e308 ^
2df9b442c ^
73919e308 ^

43bddf62d ^
73919e308 ^


2df9b442c ^
73919e308 ^


43bddf62d ^
5e5ed192e ^
2df9b442c ^
5e5ed192e ^

73919e308 ^
5e5ed192e ^

2df9b442c ^
5e5ed192e ^

73919e308 ^
5e5ed192e ^














ff5b446df ^
ffb812521 ^
5e5ed192e ^


05a3c1b10 ^


5e5ed192e ^

05a3c1b10 ^


5e5ed192e ^





ff5b446df ^
bc53d2c9d ^
5e5ed192e ^





bc53d2c9d ^
5e5ed192e ^

c32c39f1d ^
5e5ed192e ^











73919e308 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97