; * src/treesit.c (Ftreesit_induce_sparse_tree): Minor change.

This commit is contained in:
Yuan Fu 2023-01-16 20:32:15 -08:00
parent e8c77d9abd
commit b36cc7e7bb
No known key found for this signature in database
GPG key ID: 56E19BC57664A442

View file

@ -3270,9 +3270,9 @@ a regexp. */)
Lisp_Object parser = XTS_NODE (root)->parser; Lisp_Object parser = XTS_NODE (root)->parser;
Lisp_Object parent = Fcons (Qnil, Qnil); Lisp_Object parent = Fcons (Qnil, Qnil);
TSTreeCursor cursor; /* In this function we never traverse above NODE, so we don't need
if (!treesit_cursor_helper (&cursor, XTS_NODE (root)->node, parser)) to use treesit_cursor_helper. */
return Qnil; TSTreeCursor cursor = ts_tree_cursor_new (XTS_NODE (root)->node);
treesit_build_sparse_tree (&cursor, parent, predicate, process_fn, treesit_build_sparse_tree (&cursor, parent, predicate, process_fn,
the_limit, parser); the_limit, parser);