Remove document parameter from ts_node_type, ts_node_string
Co-Authored-By: Rick Winfrey <rewinfrey@github.com>
This commit is contained in:
parent
92255bbfdd
commit
666dfb76d2
9 changed files with 339 additions and 53 deletions
20
src/runtime/tree_cursor.h
Normal file
20
src/runtime/tree_cursor.h
Normal 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_
|
||||
Loading…
Add table
Add a link
Reference in a new issue