Copying and printing the copy

This commit is contained in:
Krzosa Karol
2023-03-31 22:44:11 +02:00
parent e70d544029
commit b6835d0f6a
5 changed files with 26 additions and 9 deletions

View File

@@ -834,9 +834,15 @@ compile_to_c_code() {
String core_stringify(Ast *);
For(pctx->ordered_decls) {
Ast *copy = ast_copy(it, 0);
String r = core_stringify(it);
printf("\n-----REAL!!!------\n");
printf("%s\n", r.str);
r = core_stringify(copy);
printf("\n-----COPY!!!------\n");
printf("%s\n", r.str);
}
pctx->gen.reset();
#if 0
int di = 0;