* treesit.c sectioning
[not found] <87cz6h35vh.fsf.ref@yahoo.com>
@ 2023-02-10 15:19 ` Po Lu via Emacs development discussions.
2023-02-10 16:55 ` Eli Zaretskii
0 siblings, 1 reply; 2+ messages in thread
From: Po Lu via Emacs development discussions. @ 2023-02-10 15:19 UTC (permalink / raw)
To: emacs-devel
Are there really only two parts, ``initialization'' and ``loading
language libraries'' in treesit.c?
If not, will anyone object to:
2023-02-10 Po Lu <luangruo@yahoo.com>
* src/treesit.c: Improve sectioning.
diff --git a/src/treesit.c b/src/treesit.c
index cfa3721b5e7..6ce7e2319d9 100644
--- a/src/treesit.c
+++ b/src/treesit.c
@@ -720,6 +720,7 @@ DEFUN ("treesit-language-abi-version", Ftreesit_language_abi_version,
}
}
+\f
/*** Parsing functions */
static void
@@ -1104,6 +1105,7 @@ treesit_read_buffer (void *parser, uint32_t byte_index,
return beg;
}
+\f
/*** Functions for parser and node object */
/* Wrap the parser in a Lisp_Object to be used in the Lisp
@@ -1266,6 +1268,9 @@ treesit_ensure_query_compiled (Lisp_Object query, Lisp_Object *signal_symbol,
return treesit_query;
}
+\f
+/* Lisp definitions. */
+
DEFUN ("treesit-parser-p",
Ftreesit_parser_p, Streesit_parser_p, 1, 1, 0,
doc: /* Return t if OBJECT is a tree-sitter parser. */)
@@ -1475,6 +1480,7 @@ DEFUN ("treesit-parser-language",
return XTS_PARSER (parser)->language_symbol;
}
+\f
/*** Parser API */
DEFUN ("treesit-parser-root-node",
@@ -1721,6 +1727,7 @@ DEFUN ("treesit-parser-remove-notifier", Ftreesit_parser_remove_notifier,
return Qnil;
}
+\f
/*** Node API */
/* Check that OBJ is a positive integer and signal an error if
@@ -2237,6 +2244,7 @@ DEFUN ("treesit-node-eq",
return same_node ? Qt : Qnil;
}
+\f
/*** Query functions */
DEFUN ("treesit-pattern-expand",
@@ -2811,6 +2819,7 @@ DEFUN ("treesit-query-capture",
return Fnreverse (result);
}
+\f
/*** Navigation */
static inline void
@@ -3431,7 +3440,7 @@ DEFUN ("treesit-available-p", Ftreesit_available_p,
#endif
}
-
+\f
/*** Initialization */
/* Initialize the tree-sitter routines. */
^ permalink raw reply related [flat|nested] 2+ messages in thread