Rizin
unix-like reverse engineering framework and cli tools
reduce_action.h File Reference
#include "./array.h"
#include "tree_sitter/api.h"

Go to the source code of this file.

Classes

struct  ReduceAction
 

Functions

typedef Array (ReduceAction) ReduceActionSet
 
static void ts_reduce_action_set_add (ReduceActionSet *self, ReduceAction new_action)
 

Function Documentation

◆ Array()

typedef Array ( ReduceAction  )

◆ ts_reduce_action_set_add()

static void ts_reduce_action_set_add ( ReduceActionSet *  self,
ReduceAction  new_action 
)
inlinestatic

Definition at line 20 of file reduce_action.h.

21  {
22  for (uint32_t i = 0; i < self->size; i++) {
23  ReduceAction action = self->contents[i];
24  if (action.symbol == new_action.symbol && action.count == new_action.count)
25  return;
26  }
27  array_push(self, new_action);
28 }
lzma_index ** i
Definition: index.h:629
#define array_push(self, element)
Definition: array.h:43
unsigned int uint32_t
Definition: sftypes.h:29
TSSymbol symbol
Definition: reduce_action.h:13
uint32_t count
Definition: reduce_action.h:12

References test-lz4-speed::action, array_push, ReduceAction::count, i, and ReduceAction::symbol.

Referenced by parser__do_potential_reductions(), and ts_parser__do_all_potential_reductions().