nitc :: THLVisitor
nitc :: THLVisitor :: defaultinit
nitc $ THLVisitor :: SELF
Type of this instance, automatically specialized in every classcore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
nitc :: Visitor :: current_node=
The current visited nodenitc :: Visitor :: defaultinit
nitc :: THLVisitor :: defaultinit
core :: Object :: defaultinit
nitc :: Visitor :: enter_visit
Ask the visitor to visit a given node.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 :: native_class_name
The class name of the object in CString format.core :: Object :: output_class_name
Display class name on stdout (debug only).
class THLVisitor
super Visitor
var seen = new HashSet[String]
redef fun visit(n)
do
var cn = n.class_name
if not seen.has(cn) then
seen.add cn
var hl = new TestHighlightVisitor
hl.highlight_node(n)
print "<h2>AST node: {cn} at {n.location}</h2>"
printn "<pre><code>"
hl.html.write_to(stdout)
print "</code></pre>"
end
n.visit_all(self)
end
end
src/test_highlight.nit:62,1--81,3