mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Improve error message when using ',' in struct declarations. #1920
This commit is contained in:
@@ -1629,6 +1629,10 @@ static bool parse_struct_body(ParseContext *c, Decl *parent)
|
||||
{
|
||||
RETURN_PRINT_ERROR_AT(false, member, "'inline' can only be applied to a single member, so please define it on its own line.");
|
||||
}
|
||||
if (token_is_any_type(c->tok))
|
||||
{
|
||||
RETURN_PRINT_ERROR_LAST("Did you accidentally use ',' rather than ';' between your declarations?");
|
||||
}
|
||||
}
|
||||
Decl **members = parent->strukt.members;
|
||||
unsigned last_index = vec_size(members) - 1;
|
||||
|
||||
Reference in New Issue
Block a user