]> Nishi Git Mirror - serenade.git/commitdiff
debug more
authornishi <nishi@0f02c867-ac3d-714e-8a88-971ba1f6efcf>
Tue, 30 Apr 2024 02:51:07 +0000 (02:51 +0000)
committernishi <nishi@0f02c867-ac3d-714e-8a88-971ba1f6efcf>
Tue, 30 Apr 2024 02:51:07 +0000 (02:51 +0000)
git-svn-id: file:///raid/svn-main/nishi-serenade/trunk@89 0f02c867-ac3d-714e-8a88-971ba1f6efcf

Serenade/parser.c

index 78f2f63aaf1e271fdf055994ce8a921280f12445..eb812689f0c5b8d43dfa3cae0082f71a7ec68de4 100644 (file)
@@ -230,6 +230,9 @@ struct sn_generic** sn_parse(char* data, unsigned long long size) {
 }
 
 void sn_generic_free(struct sn_interpreter* sn, struct sn_generic* g) {
+       printf("freed type %d \n:", g->type);
+       sn_print_to(stdout, g);
+       printf("\n");
        if(g->type == SN_TYPE_STRING) {
                free(g->string);
        } else if(g->type == SN_TYPE_TREE) {
@@ -237,9 +240,6 @@ void sn_generic_free(struct sn_interpreter* sn, struct sn_generic* g) {
        } else if(g->type == SN_TYPE_FUNCTION || g->type == SN_TYPE_VARIABLE) {
                free(g->name);
        }
-       printf("freed type %d \n:", g->type);
-       sn_print_to(stdout, g);
-       printf("\n");
        free(g);
        if(sn == NULL) return;
        int i;