Testing git keys, sorry

This commit is contained in:
Андреев Григорий 2025-11-25 20:27:16 +03:00
parent 2ea49d61d7
commit 3032016155

View File

@ -0,0 +1,26 @@
#ifndef prototype1_src_l1_codegen_list_template_inst_h
#define prototype1_src_l1_codegen_list_template_inst_h
#include "codegen.h"
typedef struct {
SpanU8 T;
bool t_primitive;
bool t_clonable;
} list_instantiation_op;
NODISCARD VecU8 generate_List_template_instantiation(list_instantiation_op op){
if (op.t_primitive)
op.t_clonable = true;
assert(op.T.len > 0);
VecU8 res = VecU8_fmt(
"typedef struct ListNode_%s ListNode_%s;\n" /* op.T, op.T */
"struct ListNode_%s {\n" /* op.T */
SPACE ""
"}\n\n"
);
return res;
}
#endif