Remove unnecessary accessor functions for tree

This commit is contained in:
Max Brunsfeld 2014-07-14 21:11:15 -07:00
parent 6e551d6d9f
commit 25f927e321
9 changed files with 41 additions and 55 deletions

View file

@ -1,5 +1,6 @@
#include "tree_sitter/runtime.h"
#include "tree_sitter/parser.h"
#include "runtime/tree.h"
#include <string.h>
struct TSDocument {
@ -42,7 +43,7 @@ void ts_document_edit(TSDocument *document, TSInputEdit edit) {
}
const char * ts_document_symbol_name(const TSDocument *document, const TSTree *tree) {
return ts_parser_config(document->parser).symbol_names[ts_tree_symbol(tree)];
return ts_parser_config(document->parser).symbol_names[tree->symbol];
}
typedef struct {