[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
treesit.c sectioning
From: |
Po Lu |
Subject: |
treesit.c sectioning |
Date: |
Fri, 10 Feb 2023 23:19:30 +0800 |
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,
}
}
+
/*** Parsing functions */
static void
@@ -1104,6 +1105,7 @@ treesit_read_buffer (void *parser, uint32_t byte_index,
return beg;
}
+
/*** 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;
}
+
+/* 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;
}
+
/*** Parser API */
DEFUN ("treesit-parser-root-node",
@@ -1721,6 +1727,7 @@ DEFUN ("treesit-parser-remove-notifier",
Ftreesit_parser_remove_notifier,
return Qnil;
}
+
/*** 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;
}
+
/*** Query functions */
DEFUN ("treesit-pattern-expand",
@@ -2811,6 +2819,7 @@ DEFUN ("treesit-query-capture",
return Fnreverse (result);
}
+
/*** Navigation */
static inline void
@@ -3431,7 +3440,7 @@ DEFUN ("treesit-available-p", Ftreesit_available_p,
#endif
}
-
+
/*** Initialization */
/* Initialize the tree-sitter routines. */
- treesit.c sectioning,
Po Lu <=