Start building AST in parser
This commit is contained in:
parent
5813816179
commit
614e497ac4
12 changed files with 262 additions and 50 deletions
|
|
@ -1,21 +1,22 @@
|
|||
#ifndef __tree_sitter_document_h__
|
||||
#define __tree_sitter_document_h__
|
||||
|
||||
#include "./tree.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
typedef struct TSDocument TSDocument;
|
||||
typedef TSTree * TSDocumentParseFn(const char *);
|
||||
|
||||
typedef size_t TSSymbol;
|
||||
|
||||
typedef struct {
|
||||
} TSTree;
|
||||
|
||||
TSTree TSTreeMake();
|
||||
TSDocument * TSDocumentMake();
|
||||
void TSDocumentSetUp(TSDocument *document, TSDocumentParseFn fn, const char **symbol_names);
|
||||
void TSDocumentSetText(TSDocument *document, const char *text);
|
||||
TSTree * TSDocumentTree(const TSDocument *document);
|
||||
char * TSDocumentToString(const TSDocument *document);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue