Commit graph

3178 commits

Author SHA1 Message Date
Max Brunsfeld
4d99e23946
Merge pull request #738 from tree-sitter/supertype-queries
Allow tree queries to match on nodes' supertypes
2020-09-23 12:19:04 -07:00
Max Brunsfeld
a544200a6c Simplify query code for matching supertypes 2020-09-23 11:55:03 -07:00
Max Brunsfeld
21c3bbc4b4 Account for supertypes during query analysis 2020-09-23 10:55:31 -07:00
Max Brunsfeld
5003064da7 Make supertypes automatically hidden, without underscore prefix 2020-09-23 09:35:14 -07:00
Max Brunsfeld
a8d77001c2 Update c error recovery test to reflect behavior change 2020-09-21 13:20:50 -07:00
Max Brunsfeld
8835dfda99 Fix test for supertypes in queries 2020-09-21 13:11:54 -07:00
Max Brunsfeld
b5a9adb555 Allow queries to match on supertypes
Co-authored-by: Ayman Nadeem <aymannadeem@github.com>
2020-09-21 12:34:48 -07:00
Max Brunsfeld
f10a8448ed
Merge pull request #723 from tree-sitter/comprehensive-wasm-help
Conditionally handle the presence/absence of build-wasm files.
2020-09-15 11:54:57 -07:00
Patrick Thomson
931d0c2600 fix warning and use implicit return here 2020-09-15 13:22:22 -04:00
Patrick Thomson
71f5908806 Max's suggestions. 2020-09-15 13:08:03 -04:00
Max Brunsfeld
ff488f89c9 Make the --prev-abi flag work w/ the newest abi change 2020-09-08 10:58:20 -07:00
Patrick Thomson
2a1bd3dbc2 Better naming. 2020-09-08 09:25:38 -04:00
Patrick Thomson
865f59ad74 No need for platformish logic in build.rs. 2020-09-08 09:23:54 -04:00
Patrick Thomson
660fe86300 web_ui and playground.js are always there. 2020-09-08 09:15:00 -04:00
Patrick Thomson
85cdf3dc49 adjust docs 2020-09-02 15:37:21 -04:00
Max Brunsfeld
85e4636c80
Merge pull request #722 from tree-sitter/query-last-child-fix
Fix behavior of the last child operator in tree queries
2020-09-02 12:35:39 -07:00
Patrick Thomson
92a17e782f Conditionally compile with a cfg variable instead. 2020-09-02 15:32:12 -04:00
Max Brunsfeld
36a8821f3e Fix behavior of the last child operator in tree queries 2020-09-02 12:10:04 -07:00
Patrick Thomson
6256110bd2 simplest changes, just error in the build 2020-09-02 13:31:29 -04:00
Max Brunsfeld
18150a1573
Merge pull request #644 from tree-sitter/query-pattern-is-definite
Analyze queries on construction to identify impossible patterns, and patterns that will definitely match
2020-09-02 10:28:21 -07:00
Max Brunsfeld
31a22fc627 In array.h, add comments and sort functions more logically 2020-09-02 10:02:34 -07:00
Max Brunsfeld
4b9db41584 Remove unnecessary echo in test script 2020-09-02 09:17:48 -07:00
Max Brunsfeld
87df53a99b
Merge pull request #716 from bfredl/fallthrough
avoid warnings for implicit fallthrough in switch statements
2020-08-26 10:02:00 -07:00
Björn Linse
04eacc44ef avoid warnings for implicit fallthrough in switch statements 2020-08-26 10:04:08 +02:00
Max Brunsfeld
55030afd13
Merge pull request #715 from bfredl/ubsan-warnings
Fix a few cases of Clang 10 with UBSAN detecting undefined behavior
2020-08-25 11:16:08 -07: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
4aba684d66 Control recursion depth explicitly during query analysis 2020-08-24 16:55:56 -07:00
Max Brunsfeld
315f87bbff Remove unnecessary parameter from sorted array functions 2020-08-24 12:07:57 -07:00
Max Brunsfeld
2eb04094f8 Handle aliased parent nodes in query analysis 2020-08-21 14:12:04 -07:00
Max Brunsfeld
456b1f6771 Fix handling of alternations and optional nodes in query analysis 2020-08-20 16:28:54 -07:00
Max Brunsfeld
9daec9cb22 Tweak impossible pattern error messages 2020-08-20 13:35:11 -07:00
Max Brunsfeld
4301110c12 query: Indicate specific step that's impossible 2020-08-20 13:06:38 -07:00
Max Brunsfeld
d47346abc0 Avoid pushing duplicate start states in query analysis 2020-08-20 10:07:22 -07:00
Max Brunsfeld
aac75e35b1 Optimize iteration over state successors during query analysis 2020-08-19 14:56:57 -07:00
Max Brunsfeld
bd42729a41 query: Avoid early-returning captures due to predicates 2020-08-18 13:01:45 -07:00
Max Brunsfeld
604f9e8148 query: Assign is_definite correctly for steps within nested sub-patterns 2020-08-18 10:55:03 -07:00
Max Brunsfeld
91fc9f5399 Use is_definite flag in ts_query_cursor_next_capture 2020-08-17 16:50:59 -07:00
Max Brunsfeld
228a9e28e1 Add tests for impossible queries 2020-08-17 13:27:17 -07:00
Max Brunsfeld
c3f9b2b377 Fix query analysis bugs found in ruby tags query 2020-08-17 09:57:06 -07:00
Max Brunsfeld
1ea29053e1 Merge branch 'master' into query-pattern-is-definite 2020-08-14 09:31:55 -07:00
Patrick Thomson
d5576e306c
Merge pull request #708 from tree-sitter/add-tagger-error-detection
Add ts_tags_buffer_found_parse_error capabilities for error detection during tagging.
2020-08-05 14:07:31 -04:00
Patrick Thomson
8d58a0d33a Add parameter in the header. 2020-08-05 13:10:02 -04:00
Max Brunsfeld
f91b19c089 tags, highlight: Avoid completely deallocating buffers when shrinking 2020-08-05 09:57:45 -07:00
Patrick Thomson
49be94f069 Merge remote-tracking branch 'origin/master' into add-tagger-error-detection 2020-08-05 12:44:26 -04:00
Patrick Thomson
ec6af791af Bikeshed this name a little bit. 2020-08-05 12:24:39 -04:00
Patrick Thomson
7576b0b448 Add accessor to the C header. 2020-08-05 12:21:42 -04:00
Patrick Thomson
94ab884ee4 Add a test. 2020-08-05 12:16:09 -04:00
Max Brunsfeld
32f69dbe15 tags, highlight: Limit the size of buffers that are retained in memory 2020-08-05 09:06:00 -07:00
Patrick Thomson
5c86a9c654 Fix the tests 2020-08-05 11:52:07 -04:00
Patrick Thomson
f4108056b0 Remove otiose pattern match. 2020-08-05 11:33:04 -04:00