Convert keywords back to word token at runtime if needed

This commit is contained in:
Max Brunsfeld 2018-06-15 12:25:17 -07:00
parent 0dd41f0d74
commit 4b5dab2d18
3 changed files with 38 additions and 10 deletions

View file

@ -19,7 +19,7 @@ typedef struct {
TSStateId TS_TREE_STATE_NONE = USHRT_MAX;
static const uint32_t MAX_TREE_POOL_SIZE = 1024;
static const uint32_t MAX_TREE_POOL_SIZE = 0;
static const ExternalScannerState empty_state = {.length = 0, .short_data = {0}};
@ -157,6 +157,7 @@ Subtree *ts_subtree_new_leaf(SubtreePool *pool, TSSymbol symbol, Length padding,
.named = metadata.named,
.node_count = 1,
.has_changes = false,
.is_keyword = false,
.first_leaf = {
.symbol = symbol,
.lex_mode = {0, 0},