Remove document parameter from ts_node_type, ts_node_string

Co-Authored-By: Rick Winfrey <rewinfrey@github.com>
This commit is contained in:
Max Brunsfeld 2018-05-09 16:38:56 -07:00
parent 92255bbfdd
commit 666dfb76d2
9 changed files with 339 additions and 53 deletions

20
src/runtime/tree_cursor.h Normal file
View file

@ -0,0 +1,20 @@
#ifndef RUNTIME_TREE_CURSOR_H_
#define RUNTIME_TREE_CURSOR_H_
#include "runtime/tree.h"
typedef struct {
Tree *tree;
Length position;
uint32_t child_index;
uint32_t structural_child_index;
} TreeCursorEntry;
struct TSTreeCursor {
const TSDocument *document;
Array(TreeCursorEntry) stack;
};
TSTreeCursor *ts_tree_cursor_new(const TSDocument *);
#endif // RUNTIME_TREE_CURSOR_H_