Remove unnecessary parser helper functions
This commit is contained in:
parent
292b753914
commit
963768eb8a
2 changed files with 2 additions and 12 deletions
|
|
@ -30,11 +30,11 @@ const char * ts_document_string(const ts_document *document) {
|
|||
|
||||
void ts_document_set_input(ts_document *document, ts_input input) {
|
||||
document->input = input;
|
||||
document->tree = ts_parser_parse(&document->parser, input, NULL);
|
||||
document->tree = document->parser.parse_fn(document->parser.data, input, NULL);
|
||||
}
|
||||
|
||||
void ts_document_edit(ts_document *document, ts_input_edit edit) {
|
||||
document->tree = ts_parser_parse(&document->parser, document->input, &edit);
|
||||
document->tree = document->parser.parse_fn(document->parser.data, document->input, &edit);
|
||||
}
|
||||
|
||||
const char * ts_document_symbol_name(const ts_document *document, const ts_tree *tree) {
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
#include "tree_sitter/runtime.h"
|
||||
|
||||
const ts_tree * ts_parser_parse(ts_parser *parser, ts_input input, ts_input_edit *edit) {
|
||||
return parser->parse_fn(parser->data, input, edit);
|
||||
}
|
||||
|
||||
void ts_parser_free(ts_parser *parser) {
|
||||
if (parser->free_fn != NULL)
|
||||
parser->free_fn(parser->data);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue