2026-01-09 22:36:48 +00:00
|
|
|
#include "ast.h"
|
|
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
2026-01-09 22:50:09 +00:00
|
|
|
|
|
|
|
|
static struct ast *ast_create(enum ast_type type, void *data)
|
|
|
|
|
{
|
|
|
|
|
struct ast *node = malloc(sizeof(struct ast));
|
|
|
|
|
if (!node)
|
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
|
|
node->type = type;
|
|
|
|
|
node->data = data;
|
|
|
|
|
|
|
|
|
|
return node;
|
|
|
|
|
}
|