Refactoring some stuff in the parser lib, moving functions out of headers
This commit is contained in:
parent
4580d68951
commit
fb3a2d94a0
19 changed files with 522 additions and 608 deletions
17
parser/src/reduce_action.c
Normal file
17
parser/src/reduce_action.c
Normal 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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue