Update
This commit is contained in:
parent
41289464c2
commit
1d069092a2
2 changed files with 7 additions and 7 deletions
|
|
@ -6,15 +6,15 @@
|
|||
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/06/17 12:41:56 by maiboyer #+# #+# */
|
||||
/* Updated: 2024/06/18 16:55:01 by maiboyer ### ########.fr */
|
||||
/* Updated: 2024/06/18 17:17:34 by maiboyer ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "parser/api.h"
|
||||
#include "ast/ast.h"
|
||||
#include "gmr/symbols.h"
|
||||
#include "me/mem/mem.h"
|
||||
#include "me/types.h"
|
||||
#include "parser/api.h"
|
||||
|
||||
/*
|
||||
sym_arithmetic_binary_expression
|
||||
|
|
@ -129,17 +129,16 @@ t_error build_sym_program(t_parse_node *self, t_ast_node *out)
|
|||
|
||||
if (self == NULL || out == NULL)
|
||||
return (ERROR);
|
||||
if (ts_child_grammar_symbol(self) != sym_program)
|
||||
if (ts_node_grammar_symbol(*self) != sym_program)
|
||||
return (ERROR);
|
||||
ret = mem_alloc(sizeof(*ret));
|
||||
i = 0;
|
||||
ret->kind = AST_COMPOUND_STATEMENT;
|
||||
while (i < self->childs_count)
|
||||
while (i < ts_node_child_count(*self))
|
||||
{
|
||||
i++;
|
||||
}
|
||||
|
||||
|
||||
return (*out = ret, NO_ERROR);
|
||||
return (mem_free(ret), ERROR);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1,2 @@
|
|||
#include "../src/api.h"
|
||||
#include "../src/combined.h"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue