def report_parse_status(root, parseinfo, filename=None, fp=None):
    # Report warnings after a successful parse.
    if isinstance(parseinfo, dict):
        _warnings = parseinfo.get('warnings', [])
        for w in _warnings:
            reportwarning(w, fp=fp)

    iprint(INFO_TIME, "Parse time:", parseinfo.get('parsetime'))

    if root is not None:
        # We have a parse tree, no errors to report here.
        return

    if filename == STDIN:
        filename = '<stdin>'
    else:
        filename = '%s' % filename
    line, column, parseinfo = farthest_parseinfo(parseinfo)
    parseinfo = parseinfo.copy()
    parseinfo['filename'] = filename
    reporterror('File %(filename)s, line %(error_line_number)d, column %(error_column)d' % parseinfo, fp=fp)
    reporterror(parseinfo.get('error_text'), fp=fp)
dataset/ETHPy150Open mikr/xcodeprojer/xcodeprojer.py/report_parse_status/original