mirror of
https://github.com/Ed94/gencpp.git
synced 2024-12-21 23:34:44 -08:00
fixing post-gen c-library compiler errors (still quite a few togo
This commit is contained in:
parent
4fe1a4da65
commit
7946954017
@ -250,7 +250,7 @@ void define_to_strbuilder_ref(CodeDefine define, StrBuilder* result )
|
||||
{
|
||||
GEN_ASSERT(define);
|
||||
GEN_ASSERT(define->Body);
|
||||
GEN_ASSERT(define->Body->Content);
|
||||
GEN_ASSERT(define->Body->Content.Ptr && define->Body->Content.Len > 0);
|
||||
if (define->Params) {
|
||||
StrBuilder params_builder = define_params_to_strbuilder(define->Params);
|
||||
strbuilder_append_fmt( result, "#define %S(%S) %S", define->Name, strbuilder_to_str(params_builder), define->Body->Content );
|
||||
|
@ -1327,9 +1327,9 @@ CodeDefine parser_parse_define()
|
||||
params = (CodeDefineParams) make_code();
|
||||
params->Type = CT_Parameters_Define;
|
||||
params->Name = currtok.Text;
|
||||
params->NumEntries ++;
|
||||
|
||||
define->Params = params;
|
||||
|
||||
eat( Tok_Preprocess_Define_Param );
|
||||
// #define <Name> ( <param>
|
||||
}
|
||||
@ -4964,12 +4964,13 @@ CodeTypedef parser_parse_typedef()
|
||||
// valid_macro |= macro && macro_expects_body(* macro));
|
||||
// }
|
||||
|
||||
Code macro;
|
||||
if ( valid_macro )
|
||||
#endif
|
||||
{
|
||||
type = cast(Code, t_empty);
|
||||
Code macro = parse_simple_preprocess(currtok.Type);
|
||||
name = currtok;
|
||||
Code macro = parse_simple_preprocess(currtok.Type);
|
||||
name.Text.Len = macro->Content.Len;
|
||||
_ctx->parser.Scope->Name = name.Text;
|
||||
// <ModuleFalgs> typedef <Preprocessed_Macro>
|
||||
|
Loading…
Reference in New Issue
Block a user