tree-sitter/lib/src
tree-sitter-ci-bot[bot] 3ad1c7d4e1
Fix cases where error recovery could infinite loop (#4257) (#4262)
* Rename corpus test functions to allow easy filtering by language

* Use usize for seed argument

* Avoid retaining useless stack versions when reductions merge

We found this problem when debugging an infinite loop that happened
during error recovery when using the Zig grammar. The large number of
unnecessary paused stack versions were preventing the correct recovery
strategy from being tried.

* Fix leaked lookahead token when reduction results in a merged stack

* Enable running PHP tests in CI

* Fix possible infinite loop during error recovery at EOF

* Account for external scanner state changes when detecting changed ranges in subtrees

(cherry picked from commit 066fd77d39)

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2025-03-04 15:38:59 -08:00
..
portable build: do not define _POSIX_C_SOURCE on NetBSD (#4196) 2025-03-02 23:46:23 +01:00
unicode Expand on query docs 2019-10-30 10:26:10 -07:00
wasm build(swift): include all source files 2025-01-06 01:13:04 -05:00
alloc.c fix(lib): include api.h so ts_set_allocator is visible 2024-02-27 09:21:17 -05:00
alloc.h style(lib): add parameter names in declarations that are missing them 2024-09-27 13:38:08 -04:00
array.h fix(lib): handle compiler warnings 2024-10-19 02:57:08 +00:00
atomic.h Merge branch 'master' into wasm-language 2023-10-27 12:11:43 +01:00
clock.h fix(lib): use clock_gettime on macOS again 2024-12-03 18:12:32 -05:00
error_costs.h Just call the C lib 'the library' everywhere, don't call it a 'runtime' 2019-01-10 15:22:39 -08:00
get_changed_ranges.c Fix cases where error recovery could infinite loop (#4257) (#4262) 2025-03-04 15:38:59 -08:00
get_changed_ranges.h Just call the C lib 'the library' everywhere, don't call it a 'runtime' 2019-01-10 15:22:39 -08:00
host.h Make SubtreeInlineData work on Big-Endian 2021-12-24 16:47:10 +01:00
language.c feat: add the semantic version to TSLanguage, and expose an API for retrieving it 2025-01-25 01:14:30 -05:00
language.h feat: add the semantic version to TSLanguage, and expose an API for retrieving it 2025-01-25 01:14:30 -05:00
length.h fix(lib): add saturating subtraction to prevent integer underflow 2024-12-25 04:49:39 -05:00
lexer.c chore: cleanup unused code 2025-01-21 01:17:03 -05:00
lexer.h chore: cleanup unused code 2025-01-21 01:17:03 -05:00
lib.c feat!: properly handle UTF-16 endianness encoding 2024-10-05 21:12:48 -04:00
node.c feat(lib)!: remove ts_node_child_containing_descendant 2025-01-12 22:11:30 -05:00
parser.c Fix cases where error recovery could infinite loop (#4257) (#4262) 2025-03-04 15:38:59 -08:00
parser.h feat: add the semantic version to TSLanguage, and expose an API for retrieving it 2025-01-25 01:14:30 -05:00
point.h chore: cleanup unused code 2025-01-21 01:17:03 -05:00
query.c build: do not define _POSIX_C_SOURCE on NetBSD (#4196) 2025-03-02 23:46:23 +01:00
reduce_action.h Generate node-fields.json file 2019-02-12 11:06:18 -08:00
reusable_node.h Allocate parent nodes together with their child array 2020-10-23 12:15:44 -07:00
stack.c Fix cases where error recovery could infinite loop (#4257) (#4262) 2025-03-04 15:38:59 -08:00
stack.h Fix cases where error recovery could infinite loop (#4257) (#4262) 2025-03-04 15:38:59 -08:00
subtree.c chore: cleanup unused code 2025-01-21 01:17:03 -05:00
subtree.h feat: allow parser balancing to be cancellable 2025-01-20 23:52:19 -05:00
tree.c feat!: properly handle UTF-16 endianness encoding 2024-10-05 21:12:48 -04:00
tree.h style(lib): add parameter names in declarations that are missing them 2024-09-27 13:38:08 -04:00
tree_cursor.c Fix cases where error recovery could infinite loop (#4257) (#4262) 2025-03-04 15:38:59 -08:00
tree_cursor.h style(lib): add parameter names in declarations that are missing them 2024-09-27 13:38:08 -04:00
ts_assert.h fix(lib): silence warnings with -Wpedantic 2024-09-27 12:58:26 -04:00
unicode.h feat: add the ability to specify a custom decode function 2024-10-31 22:51:40 -04:00
wasm_store.c Reset result_symbol field of lexer in wasm memory in between invocations (#4218) (#4220) 2025-02-17 18:52:32 -08:00
wasm_store.h style(lib): add parameter names in declarations that are missing them 2024-09-27 13:38:08 -04:00