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

def parse(self):

    self.document = document = self.new_document()
    self.parser.parse(self.input, document)
    document.current_source = document.current_line = None
