summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2023-02-11 09:26:11 +0800
committerPo Lu <luangruo@yahoo.com>2023-02-18 11:01:32 +0800
commit13fd7667f9c7fe5a4588bcae427e2da1ce368fe0 (patch)
tree3553b4d94b1c0ea37de466678b625c5fc01b77a1 /src
parenta40b1745d4ade399852ea15a60c07e63907eb298 (diff)
downloademacs-13fd7667f9c7fe5a4588bcae427e2da1ce368fe0.tar.gz
emacs-13fd7667f9c7fe5a4588bcae427e2da1ce368fe0.tar.bz2
emacs-13fd7667f9c7fe5a4588bcae427e2da1ce368fe0.zip
; * src/treesit.c: Improve sectioning.
Diffstat (limited to 'src')
-rw-r--r--src/treesit.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/treesit.c b/src/treesit.c
index 08119f149b7..e1d6f1ef79f 100644
--- a/src/treesit.c
+++ b/src/treesit.c
@@ -720,6 +720,7 @@ Return nil if a grammar library for LANGUAGE is not available. */)
}
}
+
/*** Parsing functions */
static void
@@ -1113,6 +1114,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
@@ -1275,6 +1277,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. */)
@@ -1493,6 +1498,7 @@ treesit_parser_live_p (Lisp_Object parser)
(!NILP (Fbuffer_live_p (XTS_PARSER (parser)->buffer))));
}
+
/*** Parser API */
DEFUN ("treesit-parser-root-node",
@@ -1739,6 +1745,7 @@ positions. PARSER is the parser issuing the notification. */)
return Qnil;
}
+
/*** Node API */
/* Check that OBJ is a positive integer and signal an error if
@@ -2261,6 +2268,7 @@ produced by tree-sitter. */)
return same_node ? Qt : Qnil;
}
+
/*** Query functions */
DEFUN ("treesit-pattern-expand",
@@ -2835,6 +2843,7 @@ the query. */)
return Fnreverse (result);
}
+
/*** Navigation */
static inline void
@@ -3455,7 +3464,7 @@ DEFUN ("treesit-available-p", Ftreesit_available_p,
#endif
}
-
+
/*** Initialization */
/* Initialize the tree-sitter routines. */