aboutsummaryrefslogtreecommitdiffstats
path: root/src/treesit.c
diff options
context:
space:
mode:
authorYuan Fu2023-09-06 22:15:21 -0700
committerYuan Fu2023-09-07 16:04:47 -0700
commita9a096ff8baed36ea2b132cb754e4e868b208604 (patch)
tree84167039540566fe6c95918563c95fca7e577758 /src/treesit.c
parent8aa9dc1c0cbdf8367511f561d39c5aef8dd71a0c (diff)
downloademacs-a9a096ff8baed36ea2b132cb754e4e868b208604.tar.gz
emacs-a9a096ff8baed36ea2b132cb754e4e868b208604.zip
Add Ftreesit_parser_tag
* lisp/treesit.el (treesit-parser-tag): Add. * src/treesit.c (Ftreesit_parser_tag): Add.
Diffstat (limited to 'src/treesit.c')
-rw-r--r--src/treesit.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/treesit.c b/src/treesit.c
index f40bd32f156..eb4b4f1ab81 100644
--- a/src/treesit.c
+++ b/src/treesit.c
@@ -1543,6 +1543,16 @@ This symbol is the one used to create the parser. */)
1543 return XTS_PARSER (parser)->language_symbol; 1543 return XTS_PARSER (parser)->language_symbol;
1544} 1544}
1545 1545
1546DEFUN ("treesit-parser-tag",
1547 Ftreesit_parser_tag, Streesit_parser_tag,
1548 1, 1, 0,
1549 doc: /* Return PARSER's tag. */)
1550 (Lisp_Object parser)
1551{
1552 treesit_check_parser (parser);
1553 return XTS_PARSER (parser)->tag;
1554}
1555
1546/* Return true if PARSER is not deleted and its buffer is live. */ 1556/* Return true if PARSER is not deleted and its buffer is live. */
1547static bool 1557static bool
1548treesit_parser_live_p (Lisp_Object parser) 1558treesit_parser_live_p (Lisp_Object parser)
@@ -4110,6 +4120,7 @@ the symbol of that THING. For example, (or sexp sentence). */);
4110 defsubr (&Streesit_parser_list); 4120 defsubr (&Streesit_parser_list);
4111 defsubr (&Streesit_parser_buffer); 4121 defsubr (&Streesit_parser_buffer);
4112 defsubr (&Streesit_parser_language); 4122 defsubr (&Streesit_parser_language);
4123 defsubr (&Streesit_parser_tag);
4113 4124
4114 defsubr (&Streesit_parser_root_node); 4125 defsubr (&Streesit_parser_root_node);
4115 /* defsubr (&Streesit_parse_string); */ 4126 /* defsubr (&Streesit_parse_string); */