Refactoring some stuff in the parser lib, moving functions out of headers

This commit is contained in:
Maix0 2024-07-04 00:43:43 +02:00
parent 4580d68951
commit fb3a2d94a0
19 changed files with 522 additions and 608 deletions

View file

@ -0,0 +1,17 @@
#include "./reduce_action.h"
void ts_reduce_action_set_add(ReduceActionSet *self, ReduceAction new_action)
{
ReduceAction action;
t_u32 i;
i = 0;
while (i < self->size)
{
action = self->contents[i];
if (action.symbol == new_action.symbol && action.count == new_action.count)
return;
i++;
}
array_push(self, new_action);
}