'Parse `self.input` into a document tree.'

def parse(self):

    self.document = document = self.new_document()
    module_section = moduleparser.parse_module(self.input, self.source.source_path)
    module_section.walk(DocformatVisitor(self.document))
    visitor = DocstringFormattingVisitor(document=document, default_parser=self.default_parser)
    module_section.walk(visitor)
    self.document.append(module_section)
