kit

kit
git clone https://git.ryansepassi.com/git/kit.git
Log | Files | Refs | README

sem.h (715B)


      1 #ifndef KIT_C_SEM_H
      2 #define KIT_C_SEM_H
      3 
      4 #include "type/type.h"
      5 
      6 typedef enum CSemAssignContext {
      7   C_SEM_ASSIGN_EXPR,
      8   C_SEM_ASSIGN_INIT,
      9   C_SEM_ASSIGN_RETURN,
     10 } CSemAssignContext;
     11 
     12 typedef struct CSemCheck {
     13   u8 ok;
     14   const char* message;
     15 } CSemCheck;
     16 
     17 CSemCheck c_sem_check_assignment(Pool*, const Type* lhs, const Type* rhs,
     18                                  CSemAssignContext);
     19 CSemCheck c_sem_check_compound_assignment(Pool*, const Type* lhs,
     20                                           const Type* rhs, int op);
     21 CSemCheck c_sem_check_redeclaration(Pool*, const Type* old_type,
     22                                     const Type* new_type,
     23                                     const Type** composite_out);
     24 
     25 #endif