nitcc_runtime :: Node :: to_dot
self
.
# Produce a graphiz file for the syntaxtic tree rooted at `self`.
fun to_dot(filepath: String)
do
var f = new FileWriter.open(filepath)
f.write("digraph g \{\n")
f.write("rankdir=BT;\n")
var a = new Array[NToken]
to_dot_visitor(f, a)
f.write("\{ rank=same\n")
var first = true
for n in a do
if first then
first = false
else
f.write("->")
end
f.write("n{n.object_id}")
end
f.write("[style=invis];\n")
f.write("\}\n")
f.write("\}\n")
f.close
end
lib/nitcc_runtime/nitcc_runtime.nit:380,2--405,4