Max Brunsfeld
32c06b9b59
Make multi-threaded test work on windows
...
Co-Authored-By: Rick Winfrey <rewinfrey@github.com>
2018-05-11 17:10:05 -07:00
Max Brunsfeld
043a2fc0d9
Assert absence of memory leaks in randomized multi-threaded tree test
2018-05-11 16:53:47 -07:00
Max Brunsfeld
a3e08e7c31
Add randomized multi-threaded tests on parse trees
...
Co-Authored-By: Rick Winfrey <rewinfrey@github.com>
2018-05-11 16:10:36 -07:00
Max Brunsfeld
e75ecd1bb1
Rework API completely
2018-05-11 10:46:13 -07:00
Max Brunsfeld
35510a612d
Rename Tree -> Subtree
2018-05-10 15:11:14 -07:00
Max Brunsfeld
61327b627a
Add a unit test asserting that ts_tree_edit doesn't mutate the tree
...
Co-Authored-By: Rick Winfrey <rewinfrey@github.com>
2018-05-10 12:28:16 -07:00
Max Brunsfeld
09e663c7d1
Make ts_tree_edit return a new tree rather than mutating its argument
...
Co-Authored-By: Rick Winfrey <rewinfrey@github.com>
2018-05-10 12:23:05 -07:00
Max Brunsfeld
df79ff5997
Refactor ts_tree_edit
...
Co-Authored-By: Rick Winfrey <rewinfrey@github.com>
2018-05-10 12:04:18 -07:00
Max Brunsfeld
973e4a44f0
Start work on removing parent pointers
...
Co-Authored-By: Rick Winfrey <rewinfrey@github.com>
2018-05-09 12:22:19 -07:00
Max Brunsfeld
09be0b6ef5
Store trees' children in TreeArrays, not w/ separate pointer and length
2018-04-06 13:26:18 -07:00
Max Brunsfeld
addeb6c4c1
Allocate and free trees using an object pool
2017-12-27 10:34:29 -08:00
Max Brunsfeld
0e69da37a5
Return a character count from the lexer's get_column method
2017-12-20 16:26:38 -08:00
Max Brunsfeld
cb5fe80348
Rename RENAME rule to ALIAS, allow it to create anonymous nodes
2017-07-31 16:41:11 -07:00
Max Brunsfeld
4b40a1ed6c
Support anonymous tokens inside of RENAME rules
2017-07-14 10:19:58 -07:00
Max Brunsfeld
0143bfdad4
Avoid use-after-free of external token states
...
Previously, it was possible for references to external token states to
outlive the trees to which those states belonged.
Now, instead of storing references to external token states in the Stack
and in the Lexer, we store references to the external token trees
themselves, and we retain the trees to prevent use-after-free.
2017-06-27 14:54:27 -07:00
Max Brunsfeld
42b05b4b5e
Add simple unit test for invalidating trees preceding an edit due to lookahead
2017-03-13 17:34:31 -07:00
Max Brunsfeld
6dc0ff359d
Rename spec -> test
...
'Test' is a lot more straightforward of a name.
2017-03-09 20:40:01 -08:00