From 711eb1d91832267bdd1fe2bc57eeebba9e637c52 Mon Sep 17 00:00:00 2001 From: Kai Stevenson Date: Wed, 20 Nov 2024 21:11:38 -0800 Subject: init --- src/parse.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/parse.h (limited to 'src/parse.h') 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 -- cgit v1.2.3-70-g09d2