From 743828450c1955e8a0ee6a01be9cb1888ee7f7b5 Mon Sep 17 00:00:00 2001 From: venko Date: Fri, 7 May 2021 17:51:23 -0700 Subject: [PATCH] Explicitly sets IdNode type tags on creation. --- src/identcheck.c | 1 + types.w | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 types.w diff --git a/src/identcheck.c b/src/identcheck.c index 14c6175..9bb8f09 100644 --- a/src/identcheck.c +++ b/src/identcheck.c @@ -14,6 +14,7 @@ IdNode* MakeIdNode(NodeType type, char *name, IdNode *parent) { node->childCount = 0; node->childCapacity = 0; node->children = NULL; + node->typeTag = NULL; return node; } diff --git a/types.w b/types.w new file mode 100644 index 0000000..f83e5e5 --- /dev/null +++ b/types.w @@ -0,0 +1,14 @@ +struct MyStruct { + foo: int; + bar: bool; + MyFunction(): int { + return foo * 420; + } +} + +struct Program { + static Main(): int { + decl: Reference>>>>; + return 0; + } +} \ No newline at end of file