42sh/src/utils/ast/ast_end.c

17 lines
258 B
C
Raw Normal View History

#include "ast_end.h"
2026-01-16 20:19:12 +01:00
#include <assert.h>
#include <stdbool.h>
#include <stdlib.h>
2026-01-16 20:19:12 +01:00
bool ast_is_end(struct ast *node)
{
assert(node != NULL);
return node->type == AST_END;
}
2026-01-16 20:31:30 +01:00
struct ast *ast_create_end(void)
2026-01-16 20:19:12 +01:00
{
return ast_create(AST_END, NULL);
}