Max Brunsfeld
5c3c1dd0bd
Get logging flags working properly with test script
2019-01-15 13:21:48 -08:00
Max Brunsfeld
6592fdd24c
Fix parser generation error messages
2019-01-11 17:26:45 -08:00
Max Brunsfeld
e64f7a64a1
Start work on running test corpus tests
2019-01-11 13:31:06 -08:00
Max Brunsfeld
0f2347b318
Just call the C lib 'the library' everywhere, don't call it a 'runtime'
2019-01-10 15:22:39 -08:00
Max Brunsfeld
47607cecf4
Reorganize repo, add rust CLI and binding code,
2019-01-04 17:31:49 -08:00
Max Brunsfeld
741fb3c5a1
Fix test now that JSON grammar has slightly changed
2018-12-01 21:26:34 -08:00
Max Brunsfeld
9ac496aced
Merge pull request #232 from bfredl/allsymbols
...
runtime: make ts_language_symbol_for_name work for alias symbols
2018-11-16 09:23:02 -08:00
Max Brunsfeld
434a39b805
Generalize balancing criteria to include repeat nodes w/ extra tokens
...
Previously, extra tokens like comments would prevent trees from being
balanced properly.
2018-11-14 10:20:36 -08:00
Björn Linse
ca24942929
runtime: make ts_language_symbol_for_name work for alias symbols
2018-11-13 11:35:38 +01:00
Max Brunsfeld
10ab7032a6
Fix incorrect node reuse for edits right at EOF
2018-11-11 21:36:31 -08:00
Max Brunsfeld
afeee894dc
Fix handling of syntax changes in ranges that were excluded but are now included
...
Refs atom/atom#18342
2018-11-08 12:16:40 -08:00
Max Brunsfeld
0e3d9c2c58
Handle changes in included ranges when parsing incrementally
2018-11-07 15:10:24 -08:00
Max Brunsfeld
24d1e7ec7e
Included embedded-template parser in randomized tests
2018-11-03 23:18:24 -07:00
Max Brunsfeld
2169c45da9
Store subtree's lookahead byte count relative to its end offset
...
This improves test coverage for incremental parsing by generalizing
the randomized tests in `real_grammars.cc` to make *multiple* edits
before incrementally re-parsing.
2018-11-02 15:23:38 -07:00
Max Brunsfeld
fa1f4aa86a
Merge pull request #204 from tree-sitter/property-sheets
...
Add a system for assigning properties to syntax nodes
2018-10-15 23:18:33 -07:00
Max Brunsfeld
c79929f8ea
Include cstring for memcmp
2018-10-03 22:09:45 -07:00
Max Brunsfeld
0aac2ab722
⬆️ bandit
2018-10-03 21:59:28 -07:00
Max Brunsfeld
00a94ac040
Fix javascript error fixture
2018-10-03 21:38:03 -07:00
Max Brunsfeld
3dab0066bc
Add missing padding bytes check before storing tree inline
2018-09-19 10:52:21 -07:00
Max Brunsfeld
b29d0f622f
Cram terminal subtree data into a 64-bit integer when possible
2018-09-17 18:52:34 -07:00
Max Brunsfeld
e00c3bbdb9
Take more parameters in ts_subtree_new_leaf
2018-09-15 00:08:47 -07:00
Max Brunsfeld
c7306722dd
Use smaller allocations for normal leaf nodes
2018-09-14 00:48:03 -07:00
Max Brunsfeld
508499bab1
Fix bug where missing token was inserted outside of any included range
2018-09-11 17:41:23 -07:00
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