Capture number of loops in PResult during parsing

This commit is contained in:
2024-12-03 03:17:20 +00:00
parent 7554cc40fd
commit d230dbb679
2 changed files with 2 additions and 1 deletions

View File

@@ -152,7 +152,7 @@ struct PResult parse_buffer(buffer_t *buffer)
goto error; goto error;
} }
return (struct PResult){nodes, usable}; return (struct PResult){nodes, usable, loops};
error: error:
if (nodes) if (nodes)
free(nodes); free(nodes);

View File

@@ -24,6 +24,7 @@ struct PResult
{ {
node_t *nodes; node_t *nodes;
size_t size; size_t size;
size_t labels;
}; };
char *ast_to_str(node_t *ast, size_t size); char *ast_to_str(node_t *ast, size_t size);