Max Brunsfeld
77e4caef4f
Revert "Store trees' children in TreeArrays, not w/ separate pointer and length"
...
This reverts commit 09be0b6ef5 .
2018-08-31 10:41:06 -07:00
Max Brunsfeld
69c815107f
Make ts_language_symbol_for_name work for ERROR
2018-08-31 09:46:55 -07:00
Max Brunsfeld
068c9841a1
Fix bug in ts_node_prev_sibling w/ empty nodes
2018-08-30 20:19:26 -07:00
Max Brunsfeld
7fc64ed25a
Account for simple aliases in unit reduction elimination
2018-08-30 09:57:22 -07:00
Max Brunsfeld
d4264d6191
Fix parsing of quantifiers with no upper bound
2018-08-06 13:47:26 -07:00
Max Brunsfeld
acc937b7d7
Handle input chunks that end within multi-byte characters
2018-08-02 15:43:30 -07:00
Max Brunsfeld
41fe564a90
Update error recovery fixture
2018-08-01 15:09:45 -07:00
Max Brunsfeld
cb784975a4
Add IMMEDIATE_TOKEN rule type, for enforcing no preceding extras
2018-08-01 14:00:57 -07:00
Max Brunsfeld
714fda917a
Update test now that JS strings are parsed differently
2018-07-31 11:50:09 -07:00
Max Brunsfeld
6ebb9195b1
Flesh out integration test for precedence within tokens
2018-07-31 10:18:49 -07:00
Max Brunsfeld
23e4596ec1
Add test for handling of precedence within tokens
2018-07-26 17:06:09 -07:00
Max Brunsfeld
e88dd223b2
Support {} quantifier syntax in regexes
2018-07-25 11:29:41 -07:00
Max Brunsfeld
999ef4fd12
Fix get_changed_ranges tests
...
Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-07-17 15:18:46 -07:00
Max Brunsfeld
8b772df3ff
Add missing #include in point_helpers
...
Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-07-17 14:13:08 -07:00
Max Brunsfeld
87c992a7f0
Add lexer API for detecting boundaries of included ranges
...
Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-07-17 13:58:26 -07:00
Max Brunsfeld
d54412266e
Avoid mutating the root node for out-of-bounds edits
2018-07-13 16:03:01 -07:00
Max Brunsfeld
0f0adfb681
Avoid recursion in ts_subtree_edit
...
This prevents stack overflows when editing very large trees.
Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-07-12 13:53:31 -07:00
Max Brunsfeld
9e8bec458d
Add ts_node_edit API
2018-07-11 16:17:46 -07:00
Max Brunsfeld
df3969e9d9
Invalidate tree's parent cache after an edit
2018-07-10 14:08:30 -07:00
Max Brunsfeld
83f88164aa
Fix end positions of tokens at the end of included ranges
...
Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-07-09 10:23:25 -07:00
Max Brunsfeld
5ab6401478
Fix TreeCursor bugs
...
* ts_tree_cursor_goto_first_child_for_byte failed to find the child
in some cases
* ts_tree_cursor_goto_parent did not handle aliased invisible parent
nodes
Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-06-28 16:17:16 -07:00
Max Brunsfeld
80cab8fd8a
Make the empty chunk 2 bytes long, for UTF16 support
2018-06-25 17:46:23 -07:00
Max Brunsfeld
89b6a14d9f
Allow creating a tree cursor starting at any node, not just the root
...
Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-06-21 12:54:04 -07:00
Max Brunsfeld
a6451f9b4f
Add ts_parser_set_include_ranges function
...
Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-06-20 13:37:43 -07:00
Max Brunsfeld
6632cb3d5c
Include byte offsets in TSRange
...
Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-06-20 11:46:44 -07:00
Max Brunsfeld
d7c1f84d7b
Remove resume method, make parse resume by default
...
Also, add a `reset` method to explicitly discard an outstanding parse.
Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-06-19 15:33:29 -07:00
Max Brunsfeld
b0b3b2e5f3
Consolidate TSInput interface down to one function
2018-06-19 09:34:40 -07:00
Max Brunsfeld
b14951de9d
Included HTML parser in randomized test suite
2018-06-15 16:17:56 -07:00
Max Brunsfeld
6e72c2943d
Avoid missing field initializer warnings w/o default field syntax
...
The default field syntax aint working on windows
2018-06-14 11:12:04 -07:00
Max Brunsfeld
fb14cb0737
Merge pull request #172 from tree-sitter/cache-parent-nodes
...
Cache parent nodes to speed up `ts_node_parent` in common cases
2018-05-29 17:21:24 -07:00
Max Brunsfeld
f3014cb767
Cache parent nodes to speed up ts_node_parent in common cases
2018-05-29 16:00:32 -07:00
Max Brunsfeld
6fca8f2f4d
Make ts_compile_grammar take an optional log file, start logging to it
2018-05-24 16:01:14 -07:00
Max Brunsfeld
69d8c6f5e6
Check that language is present in both parse() and resume()
2018-05-23 15:41:16 -07:00
Max Brunsfeld
e16f0338d6
Add APIs for pausing a parse after N operations and resuming later
2018-05-23 15:02:39 -07:00
Max Brunsfeld
c0763c69c4
Fix handling of aliases in TreeCursor
2018-05-22 14:43:21 -07:00
Phil Turnbull
d7bea0a6f6
Remove unused logger
2018-05-22 09:20:53 -07:00
Phil Turnbull
8f31a5f02a
Remove unused import
2018-05-22 09:01:59 -07:00
Phil Turnbull
c41841f4e9
Assert ts_parser_set_language in fuzz driver
2018-05-22 08:40:36 -07:00
Phil Turnbull
c56c4affb2
Use ts_tree_root_node in fuzz driver
2018-05-22 08:19:56 -07:00
Max Brunsfeld
1fece241aa
Add ts_parser_set_enabled API
2018-05-21 17:28:12 -07:00
Max Brunsfeld
78f28b14ce
Remove unused field
2018-05-18 14:27:52 -07:00
Max Brunsfeld
074c051094
Change the TSInputEdit struct to work with old/new start and end positions
2018-05-17 11:14:51 -07:00
Max Brunsfeld
e3670be42f
Avoid one heap allocation when instantiating a TSTreeCursor
2018-05-16 16:05:08 -07:00
Max Brunsfeld
6fc8d9871c
Hide the details of TSNode's fields in the public API
2018-05-16 15:44:04 -07:00
Max Brunsfeld
ebddb1a0b5
Add ts_tree_cursor_goto_first_child_for_byte method
...
Atom needs this for efficiently seeking to the leaf node at a given position,
visiting all of its ancestors along the way.
2018-05-16 13:51:21 -07:00
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
fe53506175
Declare subtrees as const wherever possible
...
Co-Authored-By: Rick Winfrey <rewinfrey@github.com>
2018-05-11 15:06:13 -07:00
Max Brunsfeld
20c183b7cd
Rename ts_subtree_make_* -> ts_subtree_new_*
2018-05-11 13:02:12 -07:00