WIP: more progress on new macro handling

This commit is contained in:
2024-12-14 18:49:41 -05:00
parent 76257123da
commit c8cf55403b
16 changed files with 400 additions and 189 deletions

View File

@ -36,7 +36,6 @@ Str code_debug_str(Code self)
case CT_Execution:
case CT_Comment:
case CT_PlatformAttributes:
case CT_Preprocess_Define:
case CT_Preprocess_Include:
case CT_Preprocess_Pragma:
case CT_Preprocess_If:
@ -52,6 +51,11 @@ Str code_debug_str(Code self)
strbuilder_append_fmt( result, "\n\tContent: %S", self->Content );
break;
case CT_Preprocess_Define:
// TODO(ED): Needs implementaton
log_failure("code_debug_str: NOT IMPLEMENTED for CT_Preprocess_Define");
break;
case CT_Class:
case CT_Struct:
if ( self->Prev )
@ -259,6 +263,11 @@ Str code_debug_str(Code self)
strbuilder_append_fmt( result, "\n\tValue : %S", self->Value ? strbuilder_to_str( code_to_strbuilder(self->Value)) : txt("Null") );
break;
case CT_Parameters_Define:
// TODO(ED): Needs implementaton
log_failure("code_debug_str: NOT IMPLEMENTED for CT_Parameters_Define");
break;
case CT_Specifiers:
{
strbuilder_append_fmt( result, "\n\tNumEntries: %d", self->NumEntries );
@ -497,6 +506,10 @@ void code_to_strbuilder_ptr( Code self, StrBuilder* result )
params_to_strbuilder_ref(cast(CodeParams, self), result );
break;
case CT_Parameters_Define:
define_params_to_strbuilder_ref(cast(CodeDefineParams, self), result);
break;
case CT_Preprocess_Define:
define_to_strbuilder_ref(cast(CodeDefine, self), result );
break;
@ -987,11 +1000,17 @@ bool code_is_equal( Code self, Code other )
return true;
}
case CT_Parameters_Define:
{
// TODO(ED): Needs implementaton
log_failure("code_is_equal: NOT IMPLEMENTED for CT_Parameters_Define");
return false;
}
case CT_Preprocess_Define:
{
check_member_str( Name );
check_member_content( Content );
check_member_content( Body->Content );
return true;
}