clang-format

This commit is contained in:
Max Brunsfeld 2016-06-22 14:11:08 -07:00
parent 3ceb3a1eb2
commit 57f669dfda
3 changed files with 9 additions and 7 deletions

View file

@ -12,8 +12,9 @@ void ts_language_table_entry(const TSLanguage *self, TSStateId state,
result->action_count = 1;
result->is_reusable = false;
result->depends_on_lookahead = false;
result->actions = (symbol == ts_builtin_sym_error) ? &ERROR_SHIFT_EXTRA
: &self->recovery_actions[symbol];
result->actions = (symbol == ts_builtin_sym_error)
? &ERROR_SHIFT_EXTRA
: &self->recovery_actions[symbol];
return;
}

View file

@ -30,9 +30,8 @@ static inline const TSParseAction *ts_language_actions(const TSLanguage *self,
return entry.actions;
}
static inline const TSParseAction *ts_language_last_action(const TSLanguage *self,
TSStateId state,
TSSymbol symbol) {
static inline const TSParseAction *ts_language_last_action(
const TSLanguage *self, TSStateId state, TSSymbol symbol) {
TableEntry entry;
ts_language_table_entry(self, state, symbol, &entry);
if (entry.action_count)

View file

@ -493,7 +493,8 @@ static Reduction ts_parser__reduce(TSParser *self, StackVersion version,
parent->extra = true;
new_state = state;
} else {
const TSParseAction *action = ts_language_last_action(language, state, symbol);
const TSParseAction *action =
ts_language_last_action(language, state, symbol);
assert(action);
assert(action->type == TSParseActionTypeShift ||
action->type == TSParseActionTypeRecover);
@ -605,7 +606,8 @@ static StackIterateAction ts_parser__error_repair_callback(
const TSParseAction *repair_symbol_action =
ts_language_last_action(self->language, state, repair->symbol);
if (!repair_symbol_action || repair_symbol_action->type != TSParseActionTypeShift)
if (!repair_symbol_action ||
repair_symbol_action->type != TSParseActionTypeShift)
continue;
TSStateId state_after_repair = repair_symbol_action->to_state;