Rework AST access API: reduce heap allocation
This commit is contained in:
parent
feb46302f3
commit
54e40b8146
16 changed files with 288 additions and 273 deletions
14
src/runtime/document.h
Normal file
14
src/runtime/document.h
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue