From 7d673646150ec10707cfe28e147d03a2ab32b775 Mon Sep 17 00:00:00 2001 From: Mustafa Quraish Date: Thu, 3 Feb 2022 21:13:05 -0500 Subject: Modify implementation of structs to support unions This was simple enough, we just needed to change the part where we were computing the offset for each field, and the total size of the compound structure. --- src/types.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/types.h') diff --git a/src/types.h b/src/types.h index e8b9488..22c0d5f 100644 --- a/src/types.h +++ b/src/types.h @@ -11,6 +11,7 @@ typedef enum { TYPE_PTR, TYPE_ARRAY, TYPE_STRUCT, + TYPE_UNION, } DataType; typedef struct data_type_node { -- cgit v1.2.3