aboutsummaryrefslogtreecommitdiff
path: root/src/parse.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-04-06 19:01:33 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-04-06 19:01:33 -0400
commitab3da1f73ad1ad99ea91dc886e06c7285e346b4b (patch)
tree94ab152b55907e919607f673b0a1936ed784119f /src/parse.c
parent89754ac89dd1d568ab0ff14d145cae259d9db66f (diff)
Add a parser error for empty enum definitions
Diffstat (limited to 'src/parse.c')
-rw-r--r--src/parse.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/parse.c b/src/parse.c
index 29432c31..7ba557fb 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -2032,6 +2032,9 @@ PARSER(parse_enum_def) {
REVERSE_LIST(tags);
+ if (tags == NULL)
+ parser_err(ctx, start, pos, "This enum does not have any tags!");
+
ast_t *namespace = NULL;
const char *ns_pos = pos;
whitespace(&ns_pos);