<commit_before>#include <stdint.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <iron/types.h>
#include <iron/utils.h>
#include <iron/log.h>
#include <iron/test.h>
#include <iron/fileio.h>
#include <iron/mem.h>
#include <iron/array.h>
#include "lisp_types.h"
#include "lisp_parser.h"
#include "lisp_compiler.h"
#include "lisp_std_types.h"

static size_t known_types_cnt[type_def_kind_cnt] = {0};
static type_def ** known_types[type_def_kind_cnt] = {NULL};

static bool compare_simple(type_def * a, type_def * b){
  return a->simple.name.id == b->simple.name.id;
}

static bool compare_pointer(type_def * a, type_def * b){
  return a->ptr.inner == b->ptr.inner;
}

static bool compare_struct(type_def * a, type_def * b){
  return a->cstruct.name.id == b->cstruct.name.id;
}

static bool compare_enum(type_def * a, type_def * b){
  return a->cenum.name.id == b->cenum.name.id;
}

static bool compare_typedef(type_def * a, type_def * b){
  return a->ctypedef.name.id ==  b->ctypedef.name.id;
}

type_def ** get_sub_types(type_def * t, size_t * cnt){
  switch(lookup.type){
  case ENUM:
  case SIMPLE:
    *cnt = 0;
    return NULL
    break;
  case POINTER:
    return t->ptr.inner;
    *cnt = 1;
    break;
  case UNION:
  case STRUCT:
    cmp = compare_struct;
    break;
  case TYPEDEF:
    cmp = compare_typedef;
    break;<commit_msg>added getting syb types<commit_after>#include <stdint.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <iron/types.h>
#include <iron/utils.h>
#include <iron/log.h>
#include <iron/test.h>
#include <iron/fileio.h>
#include <iron/mem.h>
#include <iron/array.h>
#include "lisp_types.h"
#include "lisp_parser.h"
#include "lisp_compiler.h"
#include "lisp_std_types.h"

static size_t known_types_cnt[type_def_kind_cnt] = {0};
static type_def ** known_types[type_def_kind_cnt] = {NULL};

static bool compare_simple(type_def * a, type_def * b){
  return a->simple.name.id == b->simple.name.id;
}

static bool compare_pointer(type_def * a, type_def * b){
  return a->ptr.inner == b->ptr.inner;
}

static bool compare_struct(type_def * a, type_def * b){
  return a->cstruct.name.id == b->cstruct.name.id;
}

static bool compare_enum(type_def * a, type_def * b){
  return a->cenum.name.id == b->cenum.name.id;
}

static bool compare_typedef(type_def * a, type_def * b){
  return a->ctypedef.name.id ==  b->ctypedef.name.id;
}

type_def ** get_sub_types(type_def * t, size_t * cnt){
  switch(lookup.type){
  case ENUM:
  case SIMPLE:
    *cnt = 0;
    return NULL
    break;
  case POINTER:
    return &t->ptr.inner;
    *cnt = 1;
    break;
  case UNION:
  case STRUCT:
    return
    cmp = compare_struct;
    break;
  case TYPEDEF:
    cmp = compare_typedef;
    break;
{'fraction_non_alphanumeric': 0.15276779295470885, 'fraction_numerical': 0.002156721782890007, 'mean_word_length': 3.9964093357271095, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 49, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6831988', 'n_tokens_mistral': 1137, 'n_tokens_neox': 1115, 'n_words': 241}