Max Brunsfeld
1ae5cbc851
query: Handle #not-match? in rust, wasm bindings
2020-07-24 12:15:23 -07:00
Max Brunsfeld
de2b71d465
Fix query bug when max permutations are exceeded
2020-07-23 16:05:50 -07:00
Tuấn-Anh Nguyễn
740d864e67
Add '.' as a valid start of a predicate, in addition to '#'
...
See https://github.com/ubolonton/emacs-tree-sitter/issues/38
2020-07-19 15:46:39 +07:00
Max Brunsfeld
4535efce69
query: Prevent dropping of matches when exceeding range maximum
...
Fixes #685
2020-07-17 09:39:06 -07:00
Max Brunsfeld
fef72fb434
Merge branch 'tags-utf16-columns' into tagging-improvements
2020-07-09 10:40:46 -07:00
Max Brunsfeld
255cf0a9cf
tags: Add utf16 column ranges to tags
...
Also, ensure that line ranges contain only valid UTF8.
Co-authored-by: Tim Clem <tclem@github.com>
Co-authored-by: Beka Valentine <bekavalentine@github.com>
2020-07-08 16:13:58 -07:00
Max Brunsfeld
d614c14c2c
tags: Make spans refer to name, not entire def/ref
...
Co-authored-by: Tim Clem <tclem@github.com>
Co-authored-by: Beka Valentine <bekavalentine@github.com>
2020-07-08 12:37:01 -07:00
Max Brunsfeld
0bf2450b4a
Always enforce stack version limit during reductions
...
Fixes #669
2020-07-06 15:58:33 -07:00
Max Brunsfeld
deeeb67a3b
query: Fix handling of alternations under field names ( #661 )
2020-06-24 14:20:56 -07:00
Timothy Clem
f166947abb
Test updates, definition/reference prefix is now required
2020-06-18 15:05:27 -07:00
Timothy Clem
75724698f0
Fix up tests
2020-06-18 14:42:41 -07:00
Timothy Clem
3bcb1f8c94
Assert line trimming
2020-06-18 10:48:33 -07:00
Timothy Clem
80f5c52259
Tests compile
2020-06-16 17:19:35 -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
Max Brunsfeld
47d607da8d
Add alternative syntax in queries ( #630 )
...
* Add alternative syntax in queries
* Add tests and tweak error handling for alternatives in queries
2020-06-01 13:23:07 -07:00
Max Brunsfeld
462c86903f
Improve tree queries' ability to handle large numbers of nested matches ( #624 )
...
* query: Acquire capture lists lazily, allow more concurrent states
* Fix some static analysis warnings
2020-05-18 13:40:24 -07:00
Алексей Пастухов
38d32c018b
add Rust into languages list for corpus tests ( #619 )
2020-05-15 16:02:39 -07:00
Max Brunsfeld
85c998d572
Change the wildcard syntax in tree queries
...
1. Use '_' instead of '*'.
2. Add '*' as a postfix operator for zero-or-more repetitions
Signed-off-by: Patrick Thomson <patrickt@github.com>
2020-05-11 13:04:04 -07:00
Max Brunsfeld
40262483a9
Change query syntax for predicates
...
Signed-off-by: Patrick Thomson <patrickt@github.com>
2020-05-11 12:35:51 -07:00
Max Brunsfeld
b14f564550
Add a test for nested optionals in queries
2020-05-11 10:42:48 -07:00
Max Brunsfeld
9c0535cea6
Fix logic for aborting failed matches
2020-05-08 14:15:25 -07:00
Max Brunsfeld
b47c170c75
Query: fix bugs and add tests for top-level and nested repetitions
2020-05-08 12:10:01 -07:00
Max Brunsfeld
3ad71625dd
Fix query bugs, expand and clean up query tests
2020-05-07 14:22:15 -07:00
Max Brunsfeld
3456a21f0d
Start work on restructuring query implementation to deal w/ optionals and repeats better
2020-05-07 12:41:25 -07:00
Max Brunsfeld
35f82ce301
Fix incorrect parent values after call to child_by_field_name
...
Refs tree-sitter/node-tree-sitter#61
Refs tree-sitter/tree-sitter-javascript#127
2020-04-03 11:21:51 -07:00
Max Brunsfeld
8eac81b8df
Merge branch 'master' into tags
2020-03-25 12:49:15 -07:00
Max Brunsfeld
783c087aec
tags: Handle cancellation
2020-03-25 11:26:52 -07:00
Max Brunsfeld
a003e5f6bd
generate: Avoid duplicate string tokens in unique symbol map
2020-03-20 11:35:11 -07:00
Max Brunsfeld
ae1c51051a
Fix tag order in JS tags test
2020-03-20 11:34:33 -07:00
Max Brunsfeld
aedab72afa
tags: Start work on handling local variables for ruby support
2020-03-20 10:13:03 -07:00
Max Brunsfeld
651fa38c93
Add unit test for tagging via C API. Fix docs handling
2020-03-18 10:40:15 -07:00
Max Brunsfeld
94a60b8e13
tags: Start adapting Tag struct for use in C API
2020-03-17 11:19:30 -07:00
Max Brunsfeld
d0325579ad
Use Arc to avoid use-after-free in threaded cancellation unit test
...
Fixes #579
2020-03-16 14:46:05 -07:00
Max Brunsfeld
94bbf14d0e
tags: Add test where no comments are adjacent to definition
2020-03-16 14:28:58 -07:00
Max Brunsfeld
65f2874b9e
query: Optimize handling of patterns with a wildcard at the root
...
Avoid adding and removing states for these patterns on every node in the tree
by just skipping the wildcard step of the matching process
2020-03-16 14:02:31 -07:00
Max Brunsfeld
b5483c67ab
query: allow repetition operator to be used on non-terminal nodes
2020-03-13 16:12:39 -07:00
Max Brunsfeld
b5f2ed83fe
tags: Implement select-adjacent! predicate
2020-03-13 13:02:56 -07:00
Max Brunsfeld
0457736766
rust: add handling of arbitrary predicate operators
2020-03-13 13:02:34 -07:00
Max Brunsfeld
6e2df06dc2
Start proving out tags support for JavaScript
2020-03-12 16:33:52 -07:00
Max Brunsfeld
6f636a0357
query: Add postfix '+' operator for token repetition
...
Co-Authored-By: Patrick Thomson <patrickt@users.noreply.github.com>
2020-03-12 15:10:58 -07:00
Max Brunsfeld
05c1d44e80
Merge branch 'master' into tags
2020-03-11 13:15:26 -07:00
Max Brunsfeld
e3aad995f6
query: Fix handling of patterns with wildcards at the root
2020-03-11 13:14:16 -07:00
Patrick Thomson
d798bd6bd9
Slice out the line associated with a tag.
2020-03-10 20:39:04 -04:00
Max Brunsfeld
0e02ead0de
Update tags test to reflect new handling of escapes in queries
2020-03-10 15:53:42 -07:00
Max Brunsfeld
4531130b44
Merge branch 'master' into tags
2020-03-10 15:50:27 -07:00
Max Brunsfeld
741eed01b7
query: Handle escape sequences and escaped quotes in string literals
2020-03-10 15:50:06 -07:00
Max Brunsfeld
fc4d5c3a33
🔥 Dead test code
2020-03-10 12:23:13 -07:00
Max Brunsfeld
17cc38678c
Get generate_tags with the new iterator API
2020-03-10 12:05:09 -07:00
Max Brunsfeld
0eb162c685
wip: converting generate_tags to return an iterator
2020-03-10 11:45:31 -07:00
Max Brunsfeld
157258d881
tags: Implement strip regex for docs processing
...
Co-Authored-By: Patrick Thomson <patrickt@users.noreply.github.com>
2020-03-10 10:43:23 -07:00