Commit graph

6118 commits

Author SHA1 Message Date
Riccardo Schirone
a3b440b0c8 size_t variables need %zu, not %lu 2020-07-23 09:48:18 +02:00
Max Brunsfeld
ba70927f57 tags: Skip tags with a parse error inside the name 2020-07-20 16:47:07 -07:00
Max Brunsfeld
1b8426bb65
Merge pull request #692 from ubolonton/query-dot-predicate
Add '.' as a valid start of a query predicate, in addition to '#'
2020-07-19 14:25:56 -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
82aa1462fd Clean up get_variable_info function 2020-07-17 15:12:13 -07:00
Max Brunsfeld
12341dbbc0 0.16.9 2020-07-17 14:23:54 -07:00
Max Brunsfeld
c4fca5f73e node types: Fix handling of repetitions inside of fields
Fixes #676
2020-07-17 14:19:59 -07:00
Max Brunsfeld
f4adf0269a Propagate dynamic precedence correctly for inlined rules
Fixes #683
2020-07-17 09:53:01 -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
91a715799e Accept a paths file to most CLI subcommands 2020-07-14 15:04:39 -07:00
Max Brunsfeld
32bb2e5add
Merge pull request #684 from ubolonton/cli-query-byte-range
Add --byte-range flag to query command
2020-07-13 15:22:47 -07:00
Tuấn-Anh Nguyễn
c2fb0f5229 cli: Add --byte-range flag to query command 2020-07-12 20:47:23 +07:00
Max Brunsfeld
0c2dc4c1e9
Merge pull request #648 from tree-sitter/tagging-improvements
Tagging improvements
2020-07-10 13:48:23 -07:00
Max Brunsfeld
e4e785b567 Remove unused flags from tags CLI command 2020-07-10 13:47:56 -07:00
Max Brunsfeld
4d09c81577 highlight: Avoid accidentally treating locals patterns as highlight patterns 2020-07-10 13:33:04 -07:00
Max Brunsfeld
0bfd47e2e5 Improve error message when failing to run graphviz stuff
Fixes #682
2020-07-10 10:13:19 -07:00
Max Brunsfeld
6cee04350f tags: Expose utf16 column range to C API 2020-07-09 13:39:47 -07:00
Max Brunsfeld
9e38fd9f5c Add todo comment for LossyUtf8 iterator 2020-07-09 12:32:40 -07:00
Max Brunsfeld
0f80560310 tags: Reuse work when computing utf16 columns, line ranges 2020-07-09 12:13:12 -07:00
Max Brunsfeld
52360b103d tags: Fix comment position 2020-07-09 12:07:57 -07:00
Max Brunsfeld
1ecfc2548f tags: Move impls below type definitions 2020-07-09 11:30:30 -07:00
Max Brunsfeld
b52f28d6d5 Allow measuring time for tags subcommand 2020-07-09 11:28:07 -07:00
Max Brunsfeld
fef72fb434 Merge branch 'tags-utf16-columns' into tagging-improvements 2020-07-09 10:40:46 -07:00
Max Brunsfeld
e9ea8192a3 Mention node version >= 6 in docs
Fixes #677
2020-07-09 09:11:38 -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
Jacob Gillespie
86a5dabbcb
Add TypeScript definition for DSL (#658) 2020-07-07 08:45:23 -07:00
Max Brunsfeld
0bf2450b4a Always enforce stack version limit during reductions
Fixes #669
2020-07-06 15:58:33 -07:00
intrigus-lgtm
0438ed03ff
Fix wrong file name (#666)
"build_fuzzers" -> "build-fuzzers".
It should be a hypen and not an underscore.
2020-07-06 13:47:10 -07:00
Max Brunsfeld
cc37da7457 Query analysis: fix propagation of uncertainty from later siblings 2020-06-26 16:46:12 -07:00
Max Brunsfeld
645aacb1e7 Optimize query analysis using binary search 2020-06-26 15:40:34 -07:00
Max Brunsfeld
a317199215 Add query construction to benchmark 2020-06-26 15:05:27 -07:00
Max Brunsfeld
997ef45992 Handle parent nodes with simple aliases in query analysis 2020-06-26 15:05:10 -07:00
Max Brunsfeld
19baa5fd5e Clean up and document query analysis code 2020-06-25 17:56:43 -07:00
Max Brunsfeld
891de051e2 Fix population of subgraph nodes when analyzing queries 2020-06-25 15:06:27 -07:00
Max Brunsfeld
9fb39b8954 Start work on handling alternatives when analyzing queries 2020-06-25 15:06:27 -07:00
Max Brunsfeld
e3cf5df039 Use actual step indices when walking subgraphs 2020-06-25 15:06:27 -07:00
Max Brunsfeld
7f955419a8 Start work on recognizing impossible patterns 2020-06-25 15:06:27 -07:00
Max Brunsfeld
4c2f36a07b Mark steps as definite on query construction
* Add a ts_query_pattern_is_definite API, just for debugging this
* Store state_count on TSLanguage structs, to allow for scanning parse tables
2020-06-25 15:06:27 -07:00
Max Brunsfeld
6a46dff89a Add ts_language_alias_at helper function 2020-06-25 15:06:26 -07:00
Max Brunsfeld
de53b82e2c Remove unnecessary caching on Travis
macOS Travis builds have been extremely slow due to the final caching step.
2020-06-24 14:22:37 -07:00
Max Brunsfeld
deeeb67a3b
query: Fix handling of alternations under field names (#661) 2020-06-24 14:20:56 -07:00
Timothy Clem
d9d3da9942 Fill out rest of c errors 2020-06-18 16:04:05 -07:00
Timothy Clem
f166947abb Test updates, definition/reference prefix is now required 2020-06-18 15:05:27 -07:00
Timothy Clem
ef15f4df24 Dedupe items in syntax_type_names 2020-06-18 15:05:08 -07:00
Timothy Clem
17d26c0d5a Improved errors 2020-06-18 14:43:27 -07:00
Timothy Clem
b6ae67a610 Fix up CLI, use new syntax_type_name 2020-06-18 14:43:10 -07:00
Timothy Clem
75724698f0 Fix up tests 2020-06-18 14:42:41 -07:00
Timothy Clem
54586c4e5b Named captures are dynamic
New c api for getting list of syntax_type names.
2020-06-18 14:42:30 -07:00
Timothy Clem
3bcb1f8c94 Assert line trimming 2020-06-18 10:48:33 -07:00