Rename type ts_parse_action -> TSParseAction

This commit is contained in:
Max Brunsfeld 2014-06-28 19:06:37 -07:00
parent 26f612a20d
commit 27f6eb725d
6 changed files with 17 additions and 17 deletions

View file

@ -23,7 +23,7 @@ static const int hidden_symbol_flags[SYMBOL_COUNT]
static TSStateId ts_lex_states[STATE_COUNT]
#define PARSE_TABLE \
static const ts_parse_action ts_parse_actions[STATE_COUNT][SYMBOL_COUNT]
static const TSParseAction ts_parse_actions[STATE_COUNT][SYMBOL_COUNT]
#define LEX_FN() \
static TSTree * ts_lex(TSLexer *lexer, TSStateId lex_state)
@ -89,7 +89,7 @@ TSParser constructor_name() { \
.symbol_names = ts_symbol_names, \
.data = ts_lr_parser_make( \
SYMBOL_COUNT, \
(const ts_parse_action *)ts_parse_actions, \
(const TSParseAction *)ts_parse_actions, \
ts_lex_states, \
ts_lex, \
hidden_symbol_flags \

View file

@ -14,10 +14,10 @@ typedef enum {
ts_parse_action_type_shift_extra,
ts_parse_action_type_reduce,
ts_parse_action_type_accept,
} ts_parse_action_type;
} TSParseActionType;
typedef struct {
ts_parse_action_type type;
TSParseActionType type;
union {
TSStateId to_state;
struct {
@ -25,7 +25,7 @@ typedef struct {
unsigned short child_count;
};
} data;
} ts_parse_action;
} TSParseAction;
#define SHIFT(to_state_value) \
{ .type = ts_parse_action_type_shift, .data = { .to_state = to_state_value } }
@ -47,14 +47,14 @@ typedef struct {
struct {
size_t symbol_count;
const int *hidden_symbol_flags;
const ts_parse_action *parse_table;
const TSParseAction *parse_table;
const TSStateId *lex_states;
TSTree * (* lex_fn)(TSLexer *, TSStateId);
} config;
} ts_lr_parser;
ts_lr_parser * ts_lr_parser_make(size_t symbol_count,
const ts_parse_action *parse_table,
const TSParseAction *parse_table,
const TSStateId *lex_states,
TSTree * (* lex_fn)(TSLexer *, TSStateId),
const int *hidden_symbol_flags);