From: Yuan Fu Date: Thu, 31 Aug 2023 23:00:54 +0000 (-0700) Subject: ; * src/treesit.c: Add ts function boilerplate X-Git-Tag: emacs-29.1.90~163 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=18b292140ee;p=emacs.git ; * src/treesit.c: Add ts function boilerplate --- diff --git a/src/treesit.c b/src/treesit.c index 19aacc2da7f..cb2113b3faf 100644 --- a/src/treesit.c +++ b/src/treesit.c @@ -80,6 +80,7 @@ along with GNU Emacs. If not, see . */ #undef ts_tree_cursor_current_node #undef ts_tree_cursor_delete #undef ts_tree_cursor_goto_first_child +#undef ts_tree_cursor_goto_first_child_for_byte #undef ts_tree_cursor_goto_next_sibling #undef ts_tree_cursor_goto_parent #undef ts_tree_cursor_new @@ -147,6 +148,7 @@ DEF_DLL_FN (TSTreeCursor, ts_tree_cursor_copy, (const TSTreeCursor *)); DEF_DLL_FN (TSNode, ts_tree_cursor_current_node, (const TSTreeCursor *)); DEF_DLL_FN (void, ts_tree_cursor_delete, (const TSTreeCursor *)); DEF_DLL_FN (bool, ts_tree_cursor_goto_first_child, (TSTreeCursor *)); +DEF_DLL_FN (int64_t, ts_tree_cursor_goto_first_child_for_byte, (TSTreeCursor *, uint32_t)); DEF_DLL_FN (bool, ts_tree_cursor_goto_next_sibling, (TSTreeCursor *)); DEF_DLL_FN (bool, ts_tree_cursor_goto_parent, (TSTreeCursor *)); DEF_DLL_FN (TSTreeCursor, ts_tree_cursor_new, (TSNode)); @@ -210,6 +212,7 @@ init_treesit_functions (void) LOAD_DLL_FN (library, ts_tree_cursor_current_node); LOAD_DLL_FN (library, ts_tree_cursor_delete); LOAD_DLL_FN (library, ts_tree_cursor_goto_first_child); + LOAD_DLL_FN (library, ts_tree_cursor_goto_first_child_for_byte); LOAD_DLL_FN (library, ts_tree_cursor_goto_next_sibling); LOAD_DLL_FN (library, ts_tree_cursor_goto_parent); LOAD_DLL_FN (library, ts_tree_cursor_new); @@ -267,6 +270,7 @@ init_treesit_functions (void) #define ts_tree_cursor_current_node fn_ts_tree_cursor_current_node #define ts_tree_cursor_delete fn_ts_tree_cursor_delete #define ts_tree_cursor_goto_first_child fn_ts_tree_cursor_goto_first_child +#define ts_tree_cursor_goto_first_child_for_byte fn_ts_tree_cursor_goto_first_child_for_byte #define ts_tree_cursor_goto_next_sibling fn_ts_tree_cursor_goto_next_sibling #define ts_tree_cursor_goto_parent fn_ts_tree_cursor_goto_parent #define ts_tree_cursor_new fn_ts_tree_cursor_new