From ce080b10341aa741548af6b37ceddac5cf8bf06c Mon Sep 17 00:00:00 2001
From: anon <anon@anon.anon>
Date: Fri, 15 Dec 2023 15:25:53 +0100
Subject: [PATCH] respect enums and unions

---
 debug/test_c_hw/main.c | 20 ++++++++++++++++++++
 hitags.py              | 12 ++++++++++++
 2 files changed, 32 insertions(+)

diff --git a/debug/test_c_hw/main.c b/debug/test_c_hw/main.c
index e1bfffe..e6ed7b5 100644
--- a/debug/test_c_hw/main.c
+++ b/debug/test_c_hw/main.c
@@ -3,6 +3,26 @@
 
 typedef int myint;
 
+typedef enum {
+	ENUMVALUE,
+	ENUMEND,
+} myenum;
+
+enum enum2 {
+	ENUMVALUE2,
+	ENUMEND2,
+};
+
+typedef union {
+	int i,
+	char c,
+} myunion;
+
+union myunion2 {
+	int i,
+	char c,
+};
+
 // Global variables
 int global_var = 10;
 
diff --git a/hitags.py b/hitags.py
index d89cd34..6a43b34 100755
--- a/hitags.py
+++ b/hitags.py
@@ -71,6 +71,18 @@ targets = [
 		'type': 'c',
 		'out': hi('Type')
 	},
+	{
+		'type': 'e',
+		'out': hi('Type')
+	},
+	{
+		'type': 'u',
+		'out': hi('Type')
+	},
+    {
+		'type': 'g',
+		'out': hi('Type')
+	},
 	{
 		'type': 'd',
 		'out': hi('Constant')