Commit graph

12 commits

Author SHA1 Message Date
Max Brunsfeld
584b55df8d Delete unused code, tweak whitespace 2022-01-19 16:54:57 -08:00
Max Brunsfeld
622359b400 Simplify allocation-recording in test suite using new ts_set_allocator API 2021-12-30 16:09:07 -08:00
Claudi Lleyda Moltó
8e4509e47b
Fix: cast pointers to void * when printing
To avoid undefined behaviour, pointers should be cast to `void *` when
printed with `%p`.
2021-05-21 12:36:58 +02:00
Max Brunsfeld
d533d1f076 Allocate parent nodes together with their child array 2020-10-23 12:15:44 -07:00
Max Brunsfeld
0e5ff14976
Requery the parse table when breaking down the parse stack on invalid lookahead (#636)
* Requery parse table after breaking down parse stack due to invalid lookahead

* Include Ruby parser in randomized test suite

Ruby and PHP are our only two languages that use non-terminal extras.
Adding Ruby uncovered some bugs.

* Print edited source code when running parse --edit w/ debug flag

* Recompute lookahead when breaking down stack on invalid lookahead

* Fix stack summary leak when there are two discontinuities on a stack version
2020-06-04 13:40:04 -07:00
Thomas Vigouroux
81d533d2d1
Fix compilation warnings (#635)
* lib: fix compilation warnings

* ci: add CFLAGS
2020-06-03 12:19:57 -07:00
Patrick Thomson
39bfcdf595 Fix build with MinGW tooling. (#514)
Courtesy of @Eli-Zaretskii, these fixes should unblock people from
building tree-sitter with MinGW.

I don't think this is an unreasonable maintenance burden, especially
given the Emacs project's interest in using tree-sitter, but
@maxbrunsfeld gets the final call.
2020-01-06 09:21:40 -08:00
Max Brunsfeld
bc5e71bcc2 Fix handling of zero-width external tokens at beginning of document
Fixes #316
2019-04-08 15:01:52 -07:00
Jacob Mitchell
c8d040ca26 Use 1-indexed rows in CLI and log output (resolves #287) 2019-03-14 22:21:19 -07:00
Max Brunsfeld
006a931ab8 Tests: Prevent array reallocations during ts_stack_print_dot_graph
When debugging a test with 'script/test -D', the DOT-graph generation
code was sometimes causing reallocations that were not captured by the
allocation tracker, because we explicitly disable allocation-tracking
for that method in order to reduce noise when debugging memory leaks.

By growing the relevant array *prior* to turning off allocation
tracking, we can ensure that it is not reallocated within that function,
avoiding false positive memory leak errors.

Fixes #302
2019-03-14 13:59:12 -07:00
Max Brunsfeld
dd416b0955 Update include paths to not reference 'runtime' directory 2019-01-04 17:33:34 -08:00
Max Brunsfeld
47607cecf4 Reorganize repo, add rust CLI and binding code, 2019-01-04 17:31:49 -08:00