diff --git a/lib/src/language.h b/lib/src/language.h index 6832f8fe..003123a3 100644 --- a/lib/src/language.h +++ b/lib/src/language.h @@ -41,10 +41,6 @@ bool ts_language_is_reserved_word(const TSLanguage *self, TSStateId state, TSSym TSSymbolMetadata ts_language_symbol_metadata(const TSLanguage *self, TSSymbol symbol); TSSymbol ts_language_public_symbol(const TSLanguage *self, TSSymbol symbol); -static inline bool ts_language_is_symbol_external(const TSLanguage *self, TSSymbol symbol) { - return 0 < symbol && symbol < self->external_token_count + 1; -} - static inline const TSParseAction *ts_language_actions( const TSLanguage *self, TSStateId state, diff --git a/lib/src/lexer.c b/lib/src/lexer.c index 78f216d2..94124fd1 100644 --- a/lib/src/lexer.c +++ b/lib/src/lexer.c @@ -443,12 +443,6 @@ void ts_lexer_finish(Lexer *self, uint32_t *lookahead_end_byte) { } } -void ts_lexer_advance_to_end(Lexer *self) { - while (self->chunk) { - ts_lexer__advance(&self->data, false); - } -} - void ts_lexer_mark_end(Lexer *self) { ts_lexer__mark_end(&self->data); } diff --git a/lib/src/lexer.h b/lib/src/lexer.h index 6ad663fa..7f451e3f 100644 --- a/lib/src/lexer.h +++ b/lib/src/lexer.h @@ -43,7 +43,6 @@ void ts_lexer_set_input(Lexer *self, TSInput input); void ts_lexer_reset(Lexer *self, Length position); void ts_lexer_start(Lexer *self); void ts_lexer_finish(Lexer *self, uint32_t *lookahead_end_byte); -void ts_lexer_advance_to_end(Lexer *self); void ts_lexer_mark_end(Lexer *self); bool ts_lexer_set_included_ranges(Lexer *self, const TSRange *ranges, uint32_t count); TSRange *ts_lexer_included_ranges(const Lexer *self, uint32_t *count); diff --git a/lib/src/point.h b/lib/src/point.h index 06c16f57..39581988 100644 --- a/lib/src/point.h +++ b/lib/src/point.h @@ -45,18 +45,4 @@ static inline bool point_eq(TSPoint a, TSPoint b) { return a.row == b.row && a.column == b.column; } -static inline TSPoint point_min(TSPoint a, TSPoint b) { - if (a.row < b.row || (a.row == b.row && a.column < b.column)) - return a; - else - return b; -} - -static inline TSPoint point_max(TSPoint a, TSPoint b) { - if (a.row > b.row || (a.row == b.row && a.column > b.column)) - return a; - else - return b; -} - #endif diff --git a/lib/src/subtree.c b/lib/src/subtree.c index b06ffc08..42794de7 100644 --- a/lib/src/subtree.c +++ b/lib/src/subtree.c @@ -669,12 +669,6 @@ Subtree ts_subtree_edit(Subtree self, const TSInputEdit *input_edit, SubtreePool padding = edit.new_end; } - // If the edit is a pure insertion right at the start of the subtree, - // shift the subtree over according to the insertion. - else if (edit.start.bytes == padding.bytes && is_pure_insertion) { - padding = edit.new_end; - } - // If the edit is within this subtree, resize the subtree to reflect the edit. else if ( edit.start.bytes < total_size.bytes ||