def __init__(self, json_loc):
    super(SourceLocation, self).__init__()
    logging.debug(('json: %s' % json_loc))
    self.line = json_loc['line']
    self.col = json_loc['column']
    self.filename = (os.path.basename(json_loc['file']) if ('file' in json_loc) else '(main file)')
    self.spelling = (SourceLocation(json_loc['spelling']) if ('spelling' in json_loc) else None)
def __init__(self, json_loc):
    super(SourceLocation, self).__init__()
    logging.debug(('json: %s' % json_loc))
    self.line = json_loc['line']
    self.col = json_loc['column']
    self.filename = (os.path.basename(json_loc['file']) if ('file' in json_loc) else '(main file)')
    self.spelling = (SourceLocation(json_loc['spelling']) if ('spelling' in json_loc) else None)