markdown2 :: MdASTPrinter :: defaultinit
markdown2 :: MdASTPrinter :: print_ast
Visitself
to print the AST content
markdown2 $ MdASTPrinter :: SELF
Type of this instance, automatically specialized in every classcore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
markdown2 :: MdVisitor :: defaultinit
core :: Object :: defaultinit
markdown2 :: MdASTPrinter :: defaultinit
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).markdown2 :: MdASTPrinter :: print_ast
Visitself
to print the AST content
# Print the AST content
class MdASTPrinter
super MdVisitor
# Current indent level
var indent = 0
# Visit `self` to print the AST content
fun print_ast(node: MdNode) do
print "{" " * indent}{node}"
indent += 1
node.visit_all(self)
indent -= 1
end
redef fun visit(node) do print_ast(node)
end
lib/markdown2/markdown_ast.nit:164,1--180,3