diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-04-06 19:01:33 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-04-06 19:01:33 -0400 |
| commit | ab3da1f73ad1ad99ea91dc886e06c7285e346b4b (patch) | |
| tree | 94ab152b55907e919607f673b0a1936ed784119f /src | |
| parent | 89754ac89dd1d568ab0ff14d145cae259d9db66f (diff) | |
Add a parser error for empty enum definitions
Diffstat (limited to 'src')
| -rw-r--r-- | src/parse.c | 3 |
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); |
