diff options
| author | Mustafa Quraish <[email protected]> | 2022-02-03 21:13:05 -0500 |
|---|---|---|
| committer | Mustafa Quraish <[email protected]> | 2022-02-03 21:13:05 -0500 |
| commit | 7d673646150ec10707cfe28e147d03a2ab32b775 (patch) | |
| tree | 68bc84a8e44d2b162086d3d693aedb0c52fd1610 /src/types.h | |
| parent | Add support for basic structs (diff) | |
| download | cup-7d673646150ec10707cfe28e147d03a2ab32b775.tar.xz cup-7d673646150ec10707cfe28e147d03a2ab32b775.zip | |
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.
Diffstat (limited to 'src/types.h')
| -rw-r--r-- | src/types.h | 1 |
1 files changed, 1 insertions, 0 deletions
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 { |