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 {
|
2014-07-20 20:27:33 -07:00
|
|
|
size_t ref_count;
|
2014-08-28 13:22:06 -07:00
|
|
|
size_t position;
|
2014-07-20 20:27:33 -07:00
|
|
|
size_t index;
|
|
|
|
|
const TSTree *content;
|
|
|
|
|
struct TSNode *parent;
|
|
|
|
|
const char **names;
|
2014-07-17 23:29:11 -07:00
|
|
|
};
|
|
|
|
|
|
2014-07-20 21:43:27 -07:00
|
|
|
TSNode *ts_node_make(const TSTree *tree, TSNode *parent, size_t index,
|
2014-08-28 13:22:06 -07:00
|
|
|
size_t position, const char **names);
|
2014-07-20 21:43:27 -07:00
|
|
|
TSNode *ts_node_make_root(const TSTree *tree, const char **names);
|
2014-07-17 23:29:11 -07:00
|
|
|
|
|
|
|
|
#endif
|