Fix incremental parsing
Stop collapsing hidden symbols upon reducing them. Sadly, this messes up the ability to re-use parse trees. Instead, for now, hide these nodes when stringifying parse trees
This commit is contained in:
parent
7e94a4f1b2
commit
fbe8b0a905
8 changed files with 89 additions and 68 deletions
|
|
@ -37,6 +37,10 @@ void ts_document_edit(ts_document *document, ts_input_edit edit) {
|
|||
document->tree = ts_parser_parse(&document->parser, document->input, &edit);
|
||||
}
|
||||
|
||||
const char * ts_document_symbol_name(const ts_document *document, const ts_tree *tree) {
|
||||
return document->parser.symbol_names[tree->symbol];
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
const char *string;
|
||||
size_t position;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue