feat: subshell total support

This commit is contained in:
matteo 2026-01-31 19:54:56 +01:00
parent 3e42b6fd00
commit a7065a1d9f
4 changed files with 39 additions and 6 deletions

View file

@ -11,8 +11,7 @@ void ast_free(struct ast **node)
{
if (node == NULL || *node == NULL)
{
fprintf(
stderr,
fprintf(stderr,
"WARNING: Internal error: failed to free AST node (NULL argument)");
return;
}
@ -52,14 +51,16 @@ void ast_free(struct ast **node)
case AST_FUNCTION:
ast_free_function(ast_get_function(*node));
break;
case AST_SUBSHELL:
ast_free_subshell(ast_get_subshell(*node));
break;
case AST_VOID:
case AST_END:
break;
default:
fprintf(stderr,
"WARNING: Internal error: failed to free an AST node (Unknown "
"type)");
fprintf(stderr, "WARNING: Internal error:"
" failed to free an AST node (Unknown type)");
return;
}
@ -170,4 +171,4 @@ void ast_print_dot(struct ast *ast)
fprintf(dot_pipe, "}\n");
pclose(dot_pipe);
}
*/
*/