feat(ast): AST_END type implemented
This commit is contained in:
parent
ed42f0b93d
commit
9e56654d31
2 changed files with 36 additions and 0 deletions
16
src/utils/ast/ast_end.c
Normal file
16
src/utils/ast/ast_end.c
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#include "utils/ast/ast_end.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
bool ast_is_end(struct ast *node)
|
||||
{
|
||||
assert(node != NULL);
|
||||
return node->type == AST_END;
|
||||
}
|
||||
|
||||
struct ast *ast_create_end(end)
|
||||
{
|
||||
return ast_create(AST_END, NULL);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue