nitcc_runtime $ TreePrinterVisitor :: SELF
Type of this instance, automatically specialized in every classnitcc_runtime $ TreePrinterVisitor :: visit
The specific implementation of a visitcore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
nitcc_runtime :: Visitor :: defaultinit
core :: Object :: defaultinit
nitcc_runtime :: Visitor :: enter_visit
The main entry point to visit a noden
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: Object :: output_class_name
Display class name on stdout (debug only).nitcc_runtime :: Visitor :: visit
The specific implementation of a visit
# Print a node (using to_s) on a line and recustively each children indented (with two spaces)
class TreePrinterVisitor
super Visitor
var writer: Writer
private var indent = 0
redef fun visit(n)
do
for i in [0..indent[ do writer.write(" ")
writer.write(n.to_s)
writer.write("\n")
indent += 1
super
indent -= 1
end
end
lib/nitcc_runtime/nitcc_runtime.nit:289,1--303,3