aboutsummaryrefslogtreecommitdiffstats
path: root/src/nodes.h
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2022-04-07 12:41:34 -0300
committerBad Diode <bd@badd10de.dev>2022-04-07 12:41:34 -0300
commit9f934cbc0f0fd60a6938ac1c4c84edc270de94ca (patch)
tree9304f9bc802eac175b594de4bf81730b7d815513 /src/nodes.h
parenta718a62a45b081bfd2cff8da56da2d2856ca244b (diff)
downloadbdl-9f934cbc0f0fd60a6938ac1c4c84edc270de94ca.tar.gz
bdl-9f934cbc0f0fd60a6938ac1c4c84edc270de94ca.zip
Add initial implementation of typeclass resolution
Diffstat (limited to 'src/nodes.h')
-rw-r--r--src/nodes.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nodes.h b/src/nodes.h
index acbe19e..853495a 100644
--- a/src/nodes.h
+++ b/src/nodes.h
@@ -15,11 +15,20 @@ typedef enum NodeType {
15 NODE_IF, 15 NODE_IF,
16} NodeType; 16} NodeType;
17 17
18typedef enum TypeClass {
19 TYPE_UNK,
20 TYPE_NONE,
21 TYPE_NUM,
22 TYPE_BOOL,
23 TYPE_STRING,
24} TypeClass;
25
18typedef struct Node { 26typedef struct Node {
19 NodeType type; 27 NodeType type;
20 size_t line; 28 size_t line;
21 size_t col; 29 size_t col;
22 struct Scope *scope; 30 struct Scope *scope;
31 TypeClass type_class;
23 32
24 union { 33 union {
25 // Numbers. 34 // Numbers.