summary refs log tree commit diff stats
path: root/rod/astalgo.nim
diff options
context:
space:
mode:
Diffstat (limited to 'rod/astalgo.nim')
-rwxr-xr-xrod/astalgo.nim12
1 files changed, 6 insertions, 6 deletions
diff --git a/rod/astalgo.nim b/rod/astalgo.nim
index cc0a89f71..d47dfcccb 100755
--- a/rod/astalgo.nim
+++ b/rod/astalgo.nim
@@ -263,23 +263,23 @@ proc ropeConstr(indent: int, c: openarray[PRope]): PRope =
     inc(i, 2)
   appf(result, "$n$1}", [spaces(indent)])
 
-proc symToYamlAux(n: PSym, marker: var TIntSet, indent: int, maxRecDepth: int): PRope = 
-  var ast: PRope
+proc symToYamlAux(n: PSym, marker: var TIntSet, indent: int, 
+                  maxRecDepth: int): PRope = 
   if n == nil: 
     result = toRope("null")
   elif IntSetContainsOrIncl(marker, n.id): 
     result = ropef("\"$1 @$2\"", [toRope(n.name.s), toRope(
         strutils.toHex(cast[TAddress](n), sizeof(n) * 2))])
   else: 
-    ast = treeToYamlAux(n.ast, marker, indent + 2, maxRecDepth - 1)
+    var ast = treeToYamlAux(n.ast, marker, indent + 2, maxRecDepth - 1)
     result = ropeConstr(indent, [toRope("kind"), 
                                  makeYamlString($n.kind), 
                                  toRope("name"), makeYamlString(n.name.s), 
                                  toRope("typ"), typeToYamlAux(n.typ, marker, 
-        indent + 2, maxRecDepth - 1), toRope("info"), lineInfoToStr(n.info), 
+                                   indent + 2, maxRecDepth - 1), 
+                                 toRope("info"), lineInfoToStr(n.info), 
                                  toRope("flags"), flagsToStr(n.flags), 
-                                 toRope("magic"), 
-                                 makeYamlString(MagicToStr[n.magic]), 
+                                 toRope("magic"), makeYamlString($n.magic), 
                                  toRope("ast"), ast, toRope("options"), 
                                  flagsToStr(n.options), toRope("position"), 
                                  toRope(n.position)])