Remove generated parsers' dependency on runtime.h

This commit is contained in:
Max Brunsfeld 2016-10-05 14:02:49 -07:00
parent b94a7bfd71
commit e149d94ff5
24 changed files with 181 additions and 167 deletions

View file

@ -1,6 +1,6 @@
#include "tree_sitter/parser.h"
#include "runtime/language.h"
#include "runtime/tree.h"
#include "runtime/error_costs.h"
static const TSParseAction ERROR_SHIFT_EXTRA = {
.type = TSParseActionTypeShift, .extra = true,
@ -10,7 +10,7 @@ void ts_language_table_entry(const TSLanguage *self, TSStateId state,
TSSymbol symbol, TableEntry *result) {
size_t action_index;
if (symbol == ts_builtin_sym_error) {
if (state == TS_STATE_ERROR) {
if (state == ERROR_STATE) {
result->action_count = 1;
result->is_reusable = false;
result->depends_on_lookahead = false;