Explicitly sets IdNode type tags on creation.

pull/1/head
venko 2021-05-07 17:51:23 -07:00
parent 5ab3cc533d
commit 743828450c
2 changed files with 15 additions and 0 deletions

View File

@ -14,6 +14,7 @@ IdNode* MakeIdNode(NodeType type, char *name, IdNode *parent) {
node->childCount = 0; node->childCount = 0;
node->childCapacity = 0; node->childCapacity = 0;
node->children = NULL; node->children = NULL;
node->typeTag = NULL;
return node; return node;
} }

14
types.w Normal file
View File

@ -0,0 +1,14 @@
struct MyStruct {
foo: int;
bar: bool;
MyFunction(): int {
return foo * 420;
}
}
struct Program {
static Main(): int {
decl: Reference<Reference<Reference<Reference<Reference<MyStruct>>>>>;
return 0;
}
}