'Parse the source code.'

def parse(self):

    try:
        parser = Parser(self.code, self.encoding)
        parser.parse()
        self.attr_docs = {}
        for (scope, comment) in iteritems(parser.comments):
            if comment:
                self.attr_docs[scope] = (comment.splitlines() + [''])
            else:
                self.attr_docs[scope] = ['']
        self.tags = parser.definitions
        self.tagorder = parser.deforders
    except Exception as exc:
        raise PycodeError(('parsing    failed:    %r' % exc))
