dependency impl compiles for C11 library (doing components next)

This commit is contained in:
2024-12-08 20:00:16 -05:00
parent 65c3fabc52
commit 12e31276eb
12 changed files with 194 additions and 10 deletions

View File

@ -4523,9 +4523,11 @@ CodeTypename parse_type( bool from_template, bool* typedef_is_function )
Token context_tok = prevtok;
Specifier specs_found[ 16 ] { Spec_NumSpecifiers };
s32 NumSpecifiers = 0;
s32 NumSpecifiers = 0;
Token name = { nullptr, 0, Tok_Invalid };
Token name= { nullptr, 0, Tok_Invalid };
ETypenameTag tag = Tag_None;
// Attributes are assumed to be before the type signature
CodeAttributes attributes = parse_attributes();
@ -4568,6 +4570,14 @@ CodeTypename parse_type( bool from_template, bool* typedef_is_function )
else if ( currtok.Type == Tok_Decl_Class || currtok.Type == Tok_Decl_Enum || currtok.Type == Tok_Decl_Struct
|| currtok.Type == Tok_Decl_Union )
{
switch (currtok.Type) {
case Tok_Decl_Class : tag = Tag_Class; break;
case Tok_Decl_Enum : tag = Tag_Enum; break;
case Tok_Decl_Struct : tag = Tag_Struct; break;
case Tok_Decl_Union : tag = Tag_Union; break;
default:
break;
}
eat( currtok.Type );
// <Attributes> <Specifiers> <class, enum, struct, union>
@ -4950,6 +4960,8 @@ else if ( currtok.Type == Tok_DeclType )
if ( params )
result->Params = params;
result->TypeTag = tag;
pop(& Context);
return result;
}