diff options
Diffstat (limited to 'src/parse.h')
-rw-r--r-- | src/parse.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/parse.h b/src/parse.h new file mode 100644 index 0000000..144e88c --- /dev/null +++ b/src/parse.h @@ -0,0 +1,25 @@ +#include "lexer.h" +#ifndef PARSE +#define PARSE +typedef enum PrimitiveType { + VOID, + INT, + FLOAT, + STRING +} primitive_t; +typedef enum AbstractType { + FUNCTION, + ARRAY +} abstract_t; +typedef struct Type { + primitive_t primitive; + abstract_t abstract; + struct Type* referent; +} type_t; +typedef struct Symbol { + type_t type; + void* name; + struct Symbol* args; +} sym_t; +sym_t parse(tokenSet_t tokens) +#endif |