update: normed lots of stuff
This commit is contained in:
parent
978636b6ef
commit
50a2f3d4be
118 changed files with 1145 additions and 1330 deletions
|
|
@ -6,22 +6,21 @@
|
|||
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/08/31 16:50:04 by maiboyer #+# #+# */
|
||||
/* Updated: 2024/08/31 17:00:34 by maiboyer ### ########.fr */
|
||||
/* Updated: 2024/09/19 14:44:37 by maiboyer ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "parser/inner/stack.h"
|
||||
#include "parser/inner/stack_inner.h"
|
||||
#include "parser/language.h"
|
||||
|
||||
void ts_stack_push(t_stack *self, t_stack_version version, t_subtree subtree,
|
||||
bool pending, TSStateId state)
|
||||
void ts_stack_push(t_stack *self, struct s_stack_push_arg args)
|
||||
{
|
||||
t_stack_head *head;
|
||||
t_stack_node *new_node;
|
||||
|
||||
head = array_get(&self->heads, version);
|
||||
new_node = stack_node_new(head->node, subtree, pending, state);
|
||||
if (!subtree)
|
||||
head = array_get(&self->heads, args.version);
|
||||
new_node = stack_node_new(head->node, args.subtree, args.pending, args.state);
|
||||
if (!args.subtree)
|
||||
head->node_count_at_last_error = new_node->node_count;
|
||||
head->node = new_node;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue