Remove unused tree state constant

This commit is contained in:
Max Brunsfeld 2016-06-27 14:39:12 -07:00
parent 8c26d99353
commit d554fab5b5
3 changed files with 5 additions and 11 deletions

View file

@ -500,7 +500,7 @@ static Reduction ts_parser__reduce(TSParser *self, StackVersion version,
if (fragile || self->is_split || initial_version_count > 1) {
parent->fragile_left = true;
parent->fragile_right = true;
parent->parse_state = TS_TREE_STATE_ERROR;
parent->parse_state = TS_TREE_STATE_NONE;
} else {
parent->parse_state = state;
}

View file

@ -8,8 +8,7 @@
#include "runtime/tree.h"
#include "runtime/length.h"
TSStateId TS_TREE_STATE_INDEPENDENT = USHRT_MAX;
TSStateId TS_TREE_STATE_ERROR = USHRT_MAX - 1;
TSStateId TS_TREE_STATE_NONE = USHRT_MAX;
TSTree *ts_tree_make_leaf(TSSymbol sym, TSLength padding, TSLength size,
TSSymbolMetadata metadata) {
@ -28,11 +27,7 @@ TSTree *ts_tree_make_leaf(TSSymbol sym, TSLength padding, TSLength size,
.padding = padding,
.visible = metadata.visible,
.named = metadata.named,
.parse_state = TS_TREE_STATE_INDEPENDENT,
.first_leaf =
{
.symbol = sym, .lex_state = TS_TREE_STATE_INDEPENDENT,
},
.first_leaf.symbol = sym,
};
return result;
@ -164,7 +159,7 @@ void ts_tree_set_children(TSTree *self, size_t child_count, TSTree **children) {
if (child->symbol == ts_builtin_sym_error) {
self->fragile_left = self->fragile_right = true;
self->parse_state = TS_TREE_STATE_ERROR;
self->parse_state = TS_TREE_STATE_NONE;
}
}

View file

@ -11,8 +11,7 @@ extern "C" {
#include "runtime/array.h"
#include <stdio.h>
extern TSStateId TS_TREE_STATE_INDEPENDENT;
extern TSStateId TS_TREE_STATE_ERROR;
extern TSStateId TS_TREE_STATE_NONE;
typedef struct TSTree {
struct {