Remove some unnecessary global symbols from the library
This commit is contained in:
parent
f0999d7ac0
commit
a3ce4a4282
3 changed files with 5 additions and 6 deletions
|
|
@ -122,7 +122,7 @@ static bool iterator_done(Iterator *self) {
|
|||
return self->cursor.stack.size == 0;
|
||||
}
|
||||
|
||||
Length iterator_start_position(Iterator *self) {
|
||||
static Length iterator_start_position(Iterator *self) {
|
||||
TreeCursorEntry entry = *array_back(&self->cursor.stack);
|
||||
if (self->in_padding) {
|
||||
return entry.position;
|
||||
|
|
@ -131,7 +131,7 @@ Length iterator_start_position(Iterator *self) {
|
|||
}
|
||||
}
|
||||
|
||||
Length iterator_end_position(Iterator *self) {
|
||||
static Length iterator_end_position(Iterator *self) {
|
||||
TreeCursorEntry entry = *array_back(&self->cursor.stack);
|
||||
Length result = length_add(entry.position, ts_subtree_padding(*entry.subtree));
|
||||
if (self->in_padding) {
|
||||
|
|
@ -287,7 +287,7 @@ typedef enum {
|
|||
IteratorMatches,
|
||||
} IteratorComparison;
|
||||
|
||||
IteratorComparison iterator_compare(const Iterator *old_iter, const Iterator *new_iter) {
|
||||
static IteratorComparison iterator_compare(const Iterator *old_iter, const Iterator *new_iter) {
|
||||
Subtree old_tree = NULL_SUBTREE;
|
||||
Subtree new_tree = NULL_SUBTREE;
|
||||
uint32_t old_start = 0;
|
||||
|
|
|
|||
|
|
@ -18,8 +18,6 @@ typedef struct {
|
|||
Length new_end;
|
||||
} Edit;
|
||||
|
||||
TSStateId TS_TREE_STATE_NONE = USHRT_MAX;
|
||||
|
||||
#ifdef TREE_SITTER_TEST
|
||||
|
||||
#define TS_MAX_INLINE_TREE_LENGTH 2
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include "./length.h"
|
||||
|
|
@ -13,7 +14,7 @@ extern "C" {
|
|||
#include "tree_sitter/api.h"
|
||||
#include "tree_sitter/parser.h"
|
||||
|
||||
extern TSStateId TS_TREE_STATE_NONE;
|
||||
static const TSStateId TS_TREE_STATE_NONE = USHRT_MAX;
|
||||
#define NULL_SUBTREE ((Subtree) {.ptr = NULL})
|
||||
|
||||
typedef union Subtree Subtree;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue