update: Updated stuff so the scanner works great now

This commit is contained in:
Maieul BOYER 2024-09-06 18:04:22 +02:00
parent 475038e2b7
commit 163db2241f
No known key found for this signature in database
15 changed files with 738 additions and 648 deletions

View file

@ -6,25 +6,26 @@
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/08/31 17:33:11 by maiboyer #+# #+# */
/* Updated: 2024/08/31 17:33:32 by maiboyer ### ########.fr */
/* Updated: 2024/09/06 17:11:17 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
#include "parser/reduce_action.h"
#include "me/vec/vec_reduce_action.h"
void ts_reduce_action_set_add(ReduceActionSet *self, ReduceAction new_action)
void ts_reduce_action_set_add(ReduceActionSet *self, t_reduce_action new_action)
{
ReduceAction action;
t_reduce_action action;
t_u32 i;
i = 0;
while (i < self->size)
while (i < self->len)
{
action = self->contents[i];
action = self->buffer[i];
if (action.symbol == new_action.symbol \
&& action.count == new_action.count)
return ;
i++;
}
array_push(self, new_action);
vec_reduce_action_push(self, new_action);
}