def to_definition(self):
icon = {<EOL>Name.Type.Root: icons.ICON_MIMETYPE,<EOL>Name.Type.Division: icons.ICON_DIVISION,<EOL>Name.Type.Section: icons.ICON_SECTION,<EOL>Name.Type.Variable: icons.ICON_VAR,<EOL>Name.Type.Paragraph: icons.ICON_FUNC<EOL>}[self.node_type]<EOL>d = Definition(self.name, self.line, self.column, icon, self.description)<EOL>for ch in self.children:<EOL><INDENT>d.add_child(ch.to_definition())<EOL><DEDENT>return d<EOL>
Converts the name instance to a pyqode.core.share.Definition