almost finished implementing sema
This commit is contained in:
parent
8b4b81e90b
commit
463ba71843
8 changed files with 380 additions and 43 deletions
7
sema.h
7
sema.h
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
typedef enum {
|
||||
TYPE_VOID,
|
||||
TYPE_BOOL,
|
||||
TYPE_PTR,
|
||||
TYPE_SLICE,
|
||||
TYPE_FLOAT,
|
||||
|
|
@ -42,6 +43,7 @@ typedef struct _type {
|
|||
char *name;
|
||||
usize name_len;
|
||||
member *members;
|
||||
struct { char *key; struct _type *value; } *member_types;
|
||||
} structure;
|
||||
struct {
|
||||
char *name;
|
||||
|
|
@ -57,6 +59,11 @@ typedef struct {
|
|||
type **parameters;
|
||||
} prototype;
|
||||
|
||||
typedef struct _scope {
|
||||
struct _scope *parent;
|
||||
struct { char *key; type *value; } *defs;
|
||||
} scope;
|
||||
|
||||
typedef struct {
|
||||
arena *allocator;
|
||||
ast_node *ast;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue