summaryrefslogtreecommitdiff
path: root/src/parse.h
diff options
context:
space:
mode:
authorKai Stevenson <kai@kaistevenson.com>2024-11-20 21:11:38 -0800
committerKai Stevenson <kai@kaistevenson.com>2024-11-20 21:11:38 -0800
commit711eb1d91832267bdd1fe2bc57eeebba9e637c52 (patch)
tree6cbd10ee276f1cb8119d2528cc1f7a04894228de /src/parse.h
Diffstat (limited to 'src/parse.h')
-rw-r--r--src/parse.h25
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