aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2022-12-18 07:57:34 +0200
committerEli Zaretskii2022-12-18 07:57:34 +0200
commit0fc5fb2d054c2de17a3c2a3db9110312fa366cf9 (patch)
tree9d9983a9e0a4b6867c0d51004afca7cd08642179 /src
parent5b2e6d04ce271cca2de944f8f5c07c005da33e37 (diff)
downloademacs-0fc5fb2d054c2de17a3c2a3db9110312fa366cf9.tar.gz
emacs-0fc5fb2d054c2de17a3c2a3db9110312fa366cf9.zip
Fix MS-Windows build broken by recent treesit.c changes
* src/treesit.c (init_treesit_functions, ts_tree_cursor_copy) (ts_tree_cursor_delete): Add boilerplate for using new tree-sitter functions. (ts_node_parent): Delete boilerplate of unused function.
Diffstat (limited to 'src')
-rw-r--r--src/treesit.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/treesit.c b/src/treesit.c
index 849ebad267d..c882d455137 100644
--- a/src/treesit.c
+++ b/src/treesit.c
@@ -52,7 +52,6 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
52#undef ts_node_named_descendant_for_byte_range 52#undef ts_node_named_descendant_for_byte_range
53#undef ts_node_next_named_sibling 53#undef ts_node_next_named_sibling
54#undef ts_node_next_sibling 54#undef ts_node_next_sibling
55#undef ts_node_parent
56#undef ts_node_prev_named_sibling 55#undef ts_node_prev_named_sibling
57#undef ts_node_prev_sibling 56#undef ts_node_prev_sibling
58#undef ts_node_start_byte 57#undef ts_node_start_byte
@@ -76,7 +75,9 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
76#undef ts_query_predicates_for_pattern 75#undef ts_query_predicates_for_pattern
77#undef ts_query_string_value_for_id 76#undef ts_query_string_value_for_id
78#undef ts_set_allocator 77#undef ts_set_allocator
78#undef ts_tree_cursor_copy
79#undef ts_tree_cursor_current_node 79#undef ts_tree_cursor_current_node
80#undef ts_tree_cursor_delete
80#undef ts_tree_cursor_goto_first_child 81#undef ts_tree_cursor_goto_first_child
81#undef ts_tree_cursor_goto_next_sibling 82#undef ts_tree_cursor_goto_next_sibling
82#undef ts_tree_cursor_goto_parent 83#undef ts_tree_cursor_goto_parent
@@ -109,7 +110,6 @@ DEF_DLL_FN (TSNode, ts_node_named_descendant_for_byte_range,
109 (TSNode, uint32_t, uint32_t)); 110 (TSNode, uint32_t, uint32_t));
110DEF_DLL_FN (TSNode, ts_node_next_named_sibling, (TSNode)); 111DEF_DLL_FN (TSNode, ts_node_next_named_sibling, (TSNode));
111DEF_DLL_FN (TSNode, ts_node_next_sibling, (TSNode)); 112DEF_DLL_FN (TSNode, ts_node_next_sibling, (TSNode));
112DEF_DLL_FN (TSNode, ts_node_parent, (TSNode));
113DEF_DLL_FN (TSNode, ts_node_prev_named_sibling, (TSNode)); 113DEF_DLL_FN (TSNode, ts_node_prev_named_sibling, (TSNode));
114DEF_DLL_FN (TSNode, ts_node_prev_sibling, (TSNode)); 114DEF_DLL_FN (TSNode, ts_node_prev_sibling, (TSNode));
115DEF_DLL_FN (uint32_t, ts_node_start_byte, (TSNode)); 115DEF_DLL_FN (uint32_t, ts_node_start_byte, (TSNode));
@@ -143,7 +143,9 @@ DEF_DLL_FN (const char *, ts_query_string_value_for_id,
143 (const TSQuery *, uint32_t, uint32_t *)); 143 (const TSQuery *, uint32_t, uint32_t *));
144DEF_DLL_FN (void, ts_set_allocator, 144DEF_DLL_FN (void, ts_set_allocator,
145 (void *(*)(size_t), void *(*)(size_t, size_t), void *(*)(void *, size_t), void (*)(void *))); 145 (void *(*)(size_t), void *(*)(size_t, size_t), void *(*)(void *, size_t), void (*)(void *)));
146DEF_DLL_FN (TSTreeCursor, ts_tree_cursor_copy, (const TSTreeCursor *));
146DEF_DLL_FN (TSNode, ts_tree_cursor_current_node, (const TSTreeCursor *)); 147DEF_DLL_FN (TSNode, ts_tree_cursor_current_node, (const TSTreeCursor *));
148DEF_DLL_FN (void, ts_tree_cursor_delete, (const TSTreeCursor *));
147DEF_DLL_FN (bool, ts_tree_cursor_goto_first_child, (TSTreeCursor *)); 149DEF_DLL_FN (bool, ts_tree_cursor_goto_first_child, (TSTreeCursor *));
148DEF_DLL_FN (bool, ts_tree_cursor_goto_next_sibling, (TSTreeCursor *)); 150DEF_DLL_FN (bool, ts_tree_cursor_goto_next_sibling, (TSTreeCursor *));
149DEF_DLL_FN (bool, ts_tree_cursor_goto_parent, (TSTreeCursor *)); 151DEF_DLL_FN (bool, ts_tree_cursor_goto_parent, (TSTreeCursor *));
@@ -182,7 +184,6 @@ init_treesit_functions (void)
182 LOAD_DLL_FN (library, ts_node_named_descendant_for_byte_range); 184 LOAD_DLL_FN (library, ts_node_named_descendant_for_byte_range);
183 LOAD_DLL_FN (library, ts_node_next_named_sibling); 185 LOAD_DLL_FN (library, ts_node_next_named_sibling);
184 LOAD_DLL_FN (library, ts_node_next_sibling); 186 LOAD_DLL_FN (library, ts_node_next_sibling);
185 LOAD_DLL_FN (library, ts_node_parent);
186 LOAD_DLL_FN (library, ts_node_prev_named_sibling); 187 LOAD_DLL_FN (library, ts_node_prev_named_sibling);
187 LOAD_DLL_FN (library, ts_node_prev_sibling); 188 LOAD_DLL_FN (library, ts_node_prev_sibling);
188 LOAD_DLL_FN (library, ts_node_start_byte); 189 LOAD_DLL_FN (library, ts_node_start_byte);
@@ -206,7 +207,9 @@ init_treesit_functions (void)
206 LOAD_DLL_FN (library, ts_query_predicates_for_pattern); 207 LOAD_DLL_FN (library, ts_query_predicates_for_pattern);
207 LOAD_DLL_FN (library, ts_query_string_value_for_id); 208 LOAD_DLL_FN (library, ts_query_string_value_for_id);
208 LOAD_DLL_FN (library, ts_set_allocator); 209 LOAD_DLL_FN (library, ts_set_allocator);
210 LOAD_DLL_FN (library, ts_tree_cursor_copy);
209 LOAD_DLL_FN (library, ts_tree_cursor_current_node); 211 LOAD_DLL_FN (library, ts_tree_cursor_current_node);
212 LOAD_DLL_FN (library, ts_tree_cursor_delete);
210 LOAD_DLL_FN (library, ts_tree_cursor_goto_first_child); 213 LOAD_DLL_FN (library, ts_tree_cursor_goto_first_child);
211 LOAD_DLL_FN (library, ts_tree_cursor_goto_next_sibling); 214 LOAD_DLL_FN (library, ts_tree_cursor_goto_next_sibling);
212 LOAD_DLL_FN (library, ts_tree_cursor_goto_parent); 215 LOAD_DLL_FN (library, ts_tree_cursor_goto_parent);
@@ -239,7 +242,6 @@ init_treesit_functions (void)
239#define ts_node_named_descendant_for_byte_range fn_ts_node_named_descendant_for_byte_range 242#define ts_node_named_descendant_for_byte_range fn_ts_node_named_descendant_for_byte_range
240#define ts_node_next_named_sibling fn_ts_node_next_named_sibling 243#define ts_node_next_named_sibling fn_ts_node_next_named_sibling
241#define ts_node_next_sibling fn_ts_node_next_sibling 244#define ts_node_next_sibling fn_ts_node_next_sibling
242#define ts_node_parent fn_ts_node_parent
243#define ts_node_prev_named_sibling fn_ts_node_prev_named_sibling 245#define ts_node_prev_named_sibling fn_ts_node_prev_named_sibling
244#define ts_node_prev_sibling fn_ts_node_prev_sibling 246#define ts_node_prev_sibling fn_ts_node_prev_sibling
245#define ts_node_start_byte fn_ts_node_start_byte 247#define ts_node_start_byte fn_ts_node_start_byte
@@ -263,7 +265,9 @@ init_treesit_functions (void)
263#define ts_query_predicates_for_pattern fn_ts_query_predicates_for_pattern 265#define ts_query_predicates_for_pattern fn_ts_query_predicates_for_pattern
264#define ts_query_string_value_for_id fn_ts_query_string_value_for_id 266#define ts_query_string_value_for_id fn_ts_query_string_value_for_id
265#define ts_set_allocator fn_ts_set_allocator 267#define ts_set_allocator fn_ts_set_allocator
268#define ts_tree_cursor_copy fn_ts_tree_cursor_copy
266#define ts_tree_cursor_current_node fn_ts_tree_cursor_current_node 269#define ts_tree_cursor_current_node fn_ts_tree_cursor_current_node
270#define ts_tree_cursor_delete fn_ts_tree_cursor_delete
267#define ts_tree_cursor_goto_first_child fn_ts_tree_cursor_goto_first_child 271#define ts_tree_cursor_goto_first_child fn_ts_tree_cursor_goto_first_child
268#define ts_tree_cursor_goto_next_sibling fn_ts_tree_cursor_goto_next_sibling 272#define ts_tree_cursor_goto_next_sibling fn_ts_tree_cursor_goto_next_sibling
269#define ts_tree_cursor_goto_parent fn_ts_tree_cursor_goto_parent 273#define ts_tree_cursor_goto_parent fn_ts_tree_cursor_goto_parent