2014-07-17 23:29:11 -07:00
|
|
|
#ifndef RUNTIME_NODE_H_
|
|
|
|
|
#define RUNTIME_NODE_H_
|
|
|
|
|
|
|
|
|
|
#include "tree_sitter/parser.h"
|
2014-07-18 18:52:08 -07:00
|
|
|
#include "runtime/tree.h"
|
2014-07-17 23:29:11 -07:00
|
|
|
|
|
|
|
|
struct TSNode {
|
|
|
|
|
size_t ref_count;
|
2014-07-18 13:08:14 -07:00
|
|
|
size_t start_position;
|
2014-07-17 23:29:11 -07:00
|
|
|
size_t index;
|
|
|
|
|
const TSTree *content;
|
|
|
|
|
struct TSNode *parent;
|
2014-07-18 18:52:08 -07:00
|
|
|
const char **names;
|
2014-07-17 23:29:11 -07:00
|
|
|
};
|
|
|
|
|
|
2014-07-18 18:52:08 -07:00
|
|
|
TSNode * ts_node_make(const TSTree *tree, TSNode *parent, size_t index, size_t start_position, const char **names);
|
|
|
|
|
TSNode * ts_node_make_root(const TSTree *tree, const char **names);
|
2014-07-17 23:29:11 -07:00
|
|
|
|
|
|
|
|
#endif
|