2014-06-26 08:52:42 -07:00
|
|
|
#ifndef RUNTIME_TREE_H_
|
|
|
|
|
#define RUNTIME_TREE_H_
|
|
|
|
|
|
|
|
|
|
#include "tree_sitter/runtime.h"
|
|
|
|
|
|
2014-06-28 18:45:22 -07:00
|
|
|
struct TSTree {
|
2014-06-28 18:53:32 -07:00
|
|
|
TSSymbol symbol;
|
2014-06-26 08:52:42 -07:00
|
|
|
size_t ref_count;
|
|
|
|
|
size_t offset;
|
|
|
|
|
size_t size;
|
|
|
|
|
int is_extra;
|
|
|
|
|
union {
|
|
|
|
|
struct {
|
|
|
|
|
size_t count;
|
|
|
|
|
size_t immediate_count;
|
2014-06-28 18:45:22 -07:00
|
|
|
struct TSTree **contents;
|
2014-06-26 08:52:42 -07:00
|
|
|
} children;
|
|
|
|
|
struct {
|
|
|
|
|
char lookahead_char;
|
|
|
|
|
size_t expected_input_count;
|
2014-06-28 18:53:32 -07:00
|
|
|
const TSSymbol *expected_inputs;
|
2014-06-26 08:52:42 -07:00
|
|
|
} error;
|
|
|
|
|
} data;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // RUNTIME_TREE_H_
|