Commit graph

6118 commits

Author SHA1 Message Date
Max Brunsfeld
f1821bb04d
Merge pull request #188 from tree-sitter/token-precedence
Ensure that precedence is respected properly when used within tokens
2018-07-31 12:52:14 -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
Orhan Toy
9795aa16c4 [ci skip] Fix typo (#189) 2018-07-28 16:14:59 -07:00
Max Brunsfeld
23e4596ec1 Add test for handling of precedence within tokens 2018-07-26 17:06:09 -07:00
Max Brunsfeld
9c9149ac45
Merge pull request #187 from tree-sitter/regex-quantifiers
Support {} quantifier syntax in regexes
2018-07-25 11:42:37 -07:00
Max Brunsfeld
247848baf3 Return to using the master branch of tree-sitter-javascript for testing 2018-07-25 11:29:41 -07:00
Max Brunsfeld
e88dd223b2 Support {} quantifier syntax in regexes 2018-07-25 11:29:41 -07:00
Max Brunsfeld
06c8e103d4
Merge pull request #184 from jamiebuilds/patch-1
Fix rules docs
2018-07-20 17:06:51 -07:00
Jamie
2384234aea
Fix rules docs 2018-07-20 16:58:50 -07:00
Max Brunsfeld
5fbb261316 0.3.1 2018-07-20 13:36:42 -07:00
Max Brunsfeld
bdd52376a8 Fix cargo category slugs 2018-07-20 13:36:12 -07:00
Max Brunsfeld
47a7430da3 0.3.0 2018-07-20 13:33:17 -07:00
Max Brunsfeld
c477e45fcc Update to the latest Tree-sitter 2018-07-20 13:33:17 -07:00
Max Brunsfeld
16376c43f5
Merge pull request #183 from tree-sitter/detect-included-range-boundaries
Add lexer API for detecting boundaries of included ranges
2018-07-18 09:37:16 -07:00
Max Brunsfeld
9ecb20650b Fix logic for checking out branches in fixture repos 2018-07-17 15:46:14 -07:00
Max Brunsfeld
483881ec6a Use included range branch of javascript parser for testing on windows CI
Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-07-17 15:26:29 -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
d8a420cad1 Use included range branch of javascript parser for testing 2018-07-17 14:04:37 -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
308016b776 Clarify runtime vs parser generator in README
Fixes #182
2018-07-10 14:09:22 -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
3169620ce4 Fix ranges of tokens at the beginnings of included ranges 2018-07-06 17:08:36 -07:00
Max Brunsfeld
531f2f48b1 Update list of available parsers 2018-07-05 16:45:27 -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
af6530d3b7
Merge pull request #1 from srenatus/sr/readme-fixes
README.md: small fixes
2018-06-28 09:47:13 -07:00
Stephan Renatus
2eff3225ba README.md: small fixes
To call .set_language on parser, it needs to be mut; also, the syntax
for the extern "C" blocks seemed to be a bit off.

Both now corresponds to what's in the tests.

Signed-off-by: Stephan Renatus <srenatus@chef.io>
2018-06-28 10:25:01 +02:00
Max Brunsfeld
80cab8fd8a Make the empty chunk 2 bytes long, for UTF16 support 2018-06-25 17:46:23 -07:00
Max Brunsfeld
4f5a87b952
Merge pull request #181 from tree-sitter/new-apis
Add some APIs
2018-06-24 15:48:24 -07:00
Max Brunsfeld
10c12aaa3b Add ts_language_symbol_for_name function
Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-06-21 12:54:32 -07:00
Max Brunsfeld
fae7460541 Add ts_tree_language function
Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-06-21 12:54:19 -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
35ed21139c Declare the tree field of TSNode with a type of TSTree
This field doesn't need to be treated as opaque.

Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-06-21 12:53:17 -07:00
Max Brunsfeld
7f44e8099e
Merge pull request #180 from tree-sitter/included-ranges
Add an API for parsing selected ranges of a document
2018-06-20 14:56:51 -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
be81989de2 Improve implementation page of docs 2018-06-20 09:49:23 -07:00
Max Brunsfeld
34de822738 Re-enable subtree object pool after accidentally disabling it 2018-06-19 16:33:33 -07:00
Max Brunsfeld
86c8206e35 0.2.0 2018-06-19 16:21:02 -07:00
Max Brunsfeld
5efc28f2f3 Update to latest tree-sitter API 2018-06-19 16:19:37 -07:00
Max Brunsfeld
26ab57a656
Merge pull request #179 from tree-sitter/reset-instead-of-resume
Remove `resume` method and make the main `parse` method resume by default
2018-06-19 15:47:25 -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
a24f7764d8 Get rid of string_input source file
There's not much in there now.
2018-06-19 11:27:55 -07:00
Max Brunsfeld
196d7f1355 Update sentence about TSInput in docs 2018-06-19 11:15:01 -07:00
Max Brunsfeld
9b05142439
Merge pull request #178 from tree-sitter/simplify-input-interface
Consolidate TSInput interface down to one function
2018-06-19 11:13:26 -07:00