Reuse fragile parent nodes that were reduced in the current state
This commit is contained in:
parent
f9e6fce62d
commit
6b11890d68
3 changed files with 16 additions and 5 deletions
|
|
@ -9,7 +9,8 @@ extern "C" {
|
|||
#include "tree_sitter/parser.h"
|
||||
#include "runtime/length.h"
|
||||
|
||||
#define TSTREE_LEX_STATE_INDEPENDENT (unsigned short)(-1)
|
||||
#define TSTREE_STATE_INDEPENDENT (unsigned short)(-1)
|
||||
#define TSTREE_STATE_ERROR (TSTREE_STATE_INDEPENDENT - 1)
|
||||
|
||||
struct TSTree {
|
||||
struct {
|
||||
|
|
@ -17,6 +18,7 @@ struct TSTree {
|
|||
size_t index;
|
||||
TSLength offset;
|
||||
TSStateId lex_state;
|
||||
TSStateId parse_state;
|
||||
} context;
|
||||
size_t child_count;
|
||||
size_t visible_child_count;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue