mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 16:48:19 +00:00
Add error message for bad enum declaration syntax.
BIT-1273 #close
This commit is contained in:
parent
191e5da74d
commit
ccc88beeee
3 changed files with 11 additions and 2 deletions
|
@ -127,7 +127,11 @@ static void parser_new_enum (void)
|
|||
{
|
||||
/* Starting a new enum definition. */
|
||||
assert(cur_enum_type == NULL);
|
||||
cur_enum_type = new EnumType(cur_decl_type_id->Name());
|
||||
|
||||
if ( cur_decl_type_id )
|
||||
cur_enum_type = new EnumType(cur_decl_type_id->Name());
|
||||
else
|
||||
reporter->FatalError("incorrect syntax for enum type declaration");
|
||||
}
|
||||
|
||||
static void parser_redef_enum (ID *id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue