Rework AST access API: reduce heap allocation

This commit is contained in:
Max Brunsfeld 2015-07-31 15:47:48 -07:00
parent feb46302f3
commit 54e40b8146
16 changed files with 288 additions and 273 deletions

14
src/runtime/document.h Normal file
View file

@ -0,0 +1,14 @@
#ifndef RUNTIME_DOCUMENT_H_
#define RUNTIME_DOCUMENT_H_
#include "tree_sitter/parser.h"
#include "runtime/parser.h"
#include "runtime/tree.h"
struct TSDocument {
TSParser parser;
TSInput input;
TSTree *tree;
};
#endif