Commit graph

3229 commits

Author SHA1 Message Date
Max Brunsfeld
a2d760e426 Ensure nodes are aliased consistently within syntax error nodes
Co-Authored-By: Rick Winfrey <rewinfrey@github.com>
2020-10-27 15:46:09 -07:00
Max Brunsfeld
a7125feb49
Merge pull request #780 from tree-sitter/fewer-node-allocs
Allocate parent node data alongside the array of children
2020-10-25 09:41:05 -07:00
Max Brunsfeld
2465207fee Suppress false non-null error in subtree_clone 2020-10-25 09:13:12 -07:00
Max Brunsfeld
9774f760c3 Disable clang static analyzer on CI
All of its output seems to be false positives.
2020-10-23 18:44:58 -07:00
Patrick Thomson
6fca3ebd9c
Merge pull request #779 from tree-sitter/dot-doc-dash
Document query anchor operator (#771)
2020-10-23 18:22:38 -04:00
Max Brunsfeld
533aaa462b Add heap-profiling script 2020-10-23 13:20:57 -07:00
Max Brunsfeld
b972a7158d Tweak cancellation logic for CLI commands
In 'parse' and 'highlight' cancel on stdin if stdin is a tty.
2020-10-23 12:15:44 -07:00
Max Brunsfeld
908b102786 Add more doc comments in the C lib 2020-10-23 12:15:44 -07:00
Max Brunsfeld
d533d1f076 Allocate parent nodes together with their child array 2020-10-23 12:15:44 -07:00
Patrick Thomson
1749a5d672 Shorter wording. 2020-10-23 15:11:53 -04:00
Patrick Thomson
4d8cdc2f36
Update docs/section-2-using-parsers.md
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2020-10-23 15:11:23 -04:00
Patrick Thomson
b42b873564
Update docs/section-2-using-parsers.md
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2020-10-23 15:11:17 -04:00
Patrick Thomson
b5d20f07b6 Document query anchor operator (#771)
This was taken more or less directly from @maxbrunsfeld's PR comments
in https://github.com/tree-sitter/tree-sitter/pull/549. 🎩
2020-10-23 14:34:56 -04:00
Max Brunsfeld
5caa83e020
Merge pull request #743 from XVilka/tinycc-support
Fix compilation with TinyCC
2020-10-21 07:12:19 -07:00
Anton Kochkov
3eee1d5376 Fix compilation with TinyCC 2020-10-21 15:41:19 +08:00
Max Brunsfeld
135c630e92
Merge pull request #764 from ikrima/fix-malloc-call
fix: ts_subtree_string not using ts_malloc
2020-10-15 23:50:37 -07:00
ikrima
50ff4376b4 fix: ts_subtree_string not using ts_malloc 2020-10-15 20:43:30 -07:00
Max Brunsfeld
8bb8e9b8b3 Initialize TSLanguage fields in order of their declaration
This makes parser.c valid under the C++20 standard
2020-10-15 07:20:12 -07:00
Max Brunsfeld
7aca288330 Move LossyUtf8 struct out of util module 2020-10-14 11:59:56 -07:00
Max Brunsfeld
0a46033391 Remove duplication of LossyUtf8 helper 2020-10-14 11:35:50 -07:00
Max Brunsfeld
a6d3a5736d
Merge pull request #713 from stsewd/document-new-syntax
Document alternations and wildcard nodes
2020-10-12 12:32:34 -07:00
Max Brunsfeld
87fd2f5ca3 rust: Detect debug builds using PROFILE env var in build script
Fixes #757
2020-10-12 11:53:16 -07:00
Max Brunsfeld
84433494a5 Fix query analysis error for rules w/ required hidden tokens
Refs tree-sitter/node-tree-sitter#69
2020-10-12 09:46:18 -07:00
Max Brunsfeld
8a5d820822
Merge pull request #762 from hansrajdas/patch-neovim-pr-13063
Multiple typo fixes
2020-10-11 11:18:46 -07:00
Hansraj Das
000455ee79 Multiple typo fixes
* This is a patch from neovim PR: https://github.com/neovim/neovim/pull/13063
2020-10-11 13:02:40 +05:30
Max Brunsfeld
857a9ed07b query: Handle captured wildcard nodes at the root of patterns 2020-10-08 12:34:08 -07:00
Patrick Thomson
1f3248a3e0
Merge pull request #749 from tree-sitter/ensure-extras-is-array
Fix crash when extras function doesn't return an array.
2020-10-05 16:57:27 -04:00
Patrick Thomson
b9b478873a
Merge pull request #748 from tree-sitter/fix-nonexistent-file-crash
Fix crash when nonexistent files were passed to `parse`.
2020-10-05 16:14:09 -04:00
Patrick Thomson
adce3cb8e2 Merge remote-tracking branch 'origin/master' into ensure-extras-is-array 2020-10-05 16:12:37 -04:00
Max Brunsfeld
d1c95193c1 query: Fix invalid use of slice::from_raw_parts 2020-10-05 12:08:53 -07:00
Max Brunsfeld
2a3c2ad6b9 Implement Send for QueryCursor 2020-09-30 21:19:32 -07:00
Max Brunsfeld
08356f79c7 Bump sibling cargo deps 2020-09-30 21:19:32 -07:00
Patrick Thomson
683a2da055 Fix crash when extras function doesn't return an array.
Fixes #745, which failed due to attempting to call `map` on a
non-array. This bails out at the same spot, but with a more
illuminating error message.
2020-09-30 16:21:20 -04:00
Patrick Thomson
470733b323 Fix crash when nonexistent files were passed to parse.
We were unwrapping the result of counting the characters in the vector
returned by collect_files(), which, if that vector is empty, returns
None. The most correct behavior is to halt if a nonexistent filename
was provided or a glob failed.
2020-09-30 15:52:21 -04:00
Patrick Thomson
e24de9d225
Merge pull request #746 from tree-sitter/parsing-stats
Add --stats flag for reporting parse information.
2020-09-30 13:19:27 -04:00
Patrick Thomson
33435f43c0 Take Max's suggestions. 2020-09-30 09:28:58 -04:00
Patrick Thomson
16bd061b33 Have the caller track stats here. 2020-09-29 15:43:30 -04:00
Patrick Thomson
9f9f2a52b7 Docs. 2020-09-29 12:59:05 -04:00
Patrick Thomson
939cdf12b9 Add --stats flag for reporting parse information. 2020-09-29 12:34:25 -04:00
Max Brunsfeld
5080de496a 0.17.1 2020-09-24 15:08:19 -07:00
Max Brunsfeld
28557ea8b4 highlight: 0.3 2020-09-24 15:07:56 -07:00
Max Brunsfeld
7565604626 web: 0.17.1 2020-09-24 15:06:19 -07:00
Max Brunsfeld
7361cf9a0b rust binding: 0.17.0 2020-09-24 15:05:34 -07:00
Max Brunsfeld
ba239ce4ab Make query error line numbers consistently display 1-indexed 2020-09-24 15:03:51 -07:00
Max Brunsfeld
518916f221 Return correct path and line in query errors from the CLI 2020-09-24 13:47:27 -07:00
Max Brunsfeld
297e2bcb28 static query analysis: Fix handling of fields in hidden nodes 2020-09-23 16:55:48 -07:00
Max Brunsfeld
9185262e48 web: 0.17.0 2020-09-23 13:17:35 -07:00
Max Brunsfeld
b6fba7ca4c 0.17.0 2020-09-23 13:09:19 -07:00
Max Brunsfeld
ffd3bdc4c1 Escape ? in C string literals
Fixes #714
2020-09-23 13:06:06 -07:00
Max Brunsfeld
cb343cad5e Avoid reusing the root node during incremental parsing
Fixes #712
2020-09-23 12:59:27 -07:00