tree-sitter/src/runtime/tree_cursor.h

21 lines
407 B
C
Raw Normal View History

#ifndef RUNTIME_TREE_CURSOR_H_
#define RUNTIME_TREE_CURSOR_H_
2018-05-10 15:11:14 -07:00
#include "runtime/subtree.h"
typedef struct {
const Subtree *subtree;
Length position;
uint32_t child_index;
uint32_t structural_child_index;
} TreeCursorEntry;
struct TSTreeCursor {
2018-05-10 22:22:37 -07:00
const TSTree *tree;
Array(TreeCursorEntry) stack;
};
2018-05-10 22:22:37 -07:00
void ts_tree_cursor_init(TSTreeCursor *, const TSTree *);
#endif // RUNTIME_TREE_CURSOR_H_