You can use compiler_interface hpp outside
This commit is contained in:
@@ -11,8 +11,8 @@ struct Ast_Lambda;
|
||||
struct Ast_Type;
|
||||
struct Ast_Expr;
|
||||
|
||||
#ifndef CORE_STRINGS
|
||||
#define CORE_STRINGS
|
||||
#ifndef CORE_BASE
|
||||
#define CORE_BASE
|
||||
struct String{
|
||||
uint8_t *str;
|
||||
int64_t len;
|
||||
@@ -25,6 +25,33 @@ union Intern_String{ // Basically just String
|
||||
int64_t len;
|
||||
};
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct Array {
|
||||
void *allocator;
|
||||
T *data;
|
||||
int64_t cap;
|
||||
int64_t len;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct List_Node{
|
||||
List_Node<T> *next;
|
||||
List_Node<T> *prev;
|
||||
int cap;
|
||||
int len;
|
||||
T data[];
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct List{
|
||||
int block_size = 0;
|
||||
int allocation_multiplier = 0;
|
||||
List_Node<T> *first = 0;
|
||||
List_Node<T> *last = 0;
|
||||
List_Node<T> *first_free = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
enum Token_Kind{
|
||||
|
||||
Reference in New Issue
Block a user