Björn Linse
04eacc44ef
avoid warnings for implicit fallthrough in switch statements
2020-08-26 10:04:08 +02:00
Björn Linse
00c470ab2a
Fix a few cases of Clang 10 with UBSAN detecting undefined behavior
...
Clang 10 considers adding any offset, including 0, to the null pointer
to be undefined behavior. `(void *)NULL + 0 = kaboom`.
2020-08-25 19:34:44 +02:00
Max Brunsfeld
af655547e5
Fix handling of queries with many patterns with leading repetitions
2020-07-31 12:47:58 -07:00
Max Brunsfeld
411f69d13b
query: Optimize 'longest-match' filtering
2020-07-30 13:34:34 -07:00
Max Brunsfeld
df5510acfc
query: Remove limit on number of in-progress states
2020-07-30 12:59:34 -07:00
Max Brunsfeld
6941217c46
Merge pull request #696 from ret2libc/printf-sizet-format
...
size_t variables need %zu, not %lu
2020-07-29 09:56:07 -07:00
Max Brunsfeld
81bbdf19f4
Fix handling of non-terminal extras that share non-extra rules
...
Fixes #701
2020-07-29 09:50:13 -07:00
Max Brunsfeld
253f23c3d4
Fix error when parse error occurs after non-terminal extra
2020-07-28 13:33:13 -07:00
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
Riccardo Schirone
a3b440b0c8
size_t variables need %zu, not %lu
2020-07-23 09:48:18 +02: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
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
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
Thomas Vigouroux
81d533d2d1
Fix compilation warnings ( #635 )
...
* lib: fix compilation warnings
* ci: add CFLAGS
2020-06-03 12:19:57 -07:00
Max Brunsfeld
b57bd59ed4
web: 0.16.4
2020-06-01 13:47:28 -07:00
Max Brunsfeld
c31afbb86a
lib: 0.16.1
2020-06-01 13:45:54 -07:00
Max Brunsfeld
28a779d6a0
wasm: Allow arbitrary predicates in queries
2020-06-01 13:28:52 -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
Max Brunsfeld
40993195b8
Fix wasm tests on CI ( #616 )
...
* wasm: Improve error message on missing language symbol
* Fix source file existence checks in build-wasm command
2020-05-13 15:14:43 -07:00
Max Brunsfeld
d7a188ce7f
web: 0.16.3
2020-05-12 16:22:11 -07:00
Max Brunsfeld
392f023e59
rust: 0.16.0
2020-05-12 16:21:56 -07:00
Max Brunsfeld
f38f5d1d22
Tweak readmes
2020-05-12 16:16:48 -07:00
Max Brunsfeld
fce5c50f81
Fix wasm query tests
2020-05-11 16:19:42 -07:00
Max Brunsfeld
68f43b5865
Make query syntax backward-compatible
2020-05-11 13:23:44 -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
9c0535cea6
Fix logic for aborting failed matches
2020-05-08 14:15:25 -07:00
Max Brunsfeld
b0671aea6a
Reorder some code in ts_query_cursor__advance
2020-05-08 12:13:21 -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
1011be76b7
Handle trailing optional nodes in queries
2020-05-07 12:41:25 -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
Riccardo Schirone
780e9cecc9
Do not use multiple unnamed structs inside of unions
2020-04-29 20:42:45 +02:00
Andy Pan
1635aab801
Fix exporting get/set timeout in web binding ( #592 )
...
* Fix exporting get/set timeout in web binding
Add two symbols "_ts_parser_set_timeout_micros", "_ts_parser_timeout_micros" due to usage in `tree-sitter.js`.
* Fix getTimeoutMicros() not returning the value
2020-04-11 08:21:59 -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
21175142af
Merge pull request #583 from tree-sitter/tags
...
Add a 'tags' crate, for computing ctags-style code navigation tags
2020-04-03 11:20:51 -07:00
Alberto González Palomo
bc0d53d4f0
Clarify where to put cc dependency for build script. ( #586 )
2020-03-30 09:43:41 -07:00
Max Brunsfeld
322b311c2c
Clear QueryCursor state between exec calls
2020-03-26 16:10:39 -07:00
Max Brunsfeld
8eac81b8df
Merge branch 'master' into tags
2020-03-25 12:49:15 -07:00
Max Brunsfeld
f453178ca2
rust: Remove unnecessary dependencies from core library
2020-03-16 14:46:05 -07:00
Luca Barbato
21de99de87
Remove non-building doctests ( #578 )
2020-03-16 14:35:27 -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
0457736766
rust: add handling of arbitrary predicate operators
2020-03-13 13:02:34 -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