Function: treesit-parser-root-node
treesit-parser-root-node is a function defined in treesit.c.
Signature
(treesit-parser-root-node PARSER)
Documentation
Return the root node of PARSER.
Other relevant functions are documented in the treesit group.
Shortdoc
;; treesit
(treesit-parser-root-node parser)
e.g. => #<treesit-node (translation_unit) in 1-4830>
Source Code
// Defined in /usr/src/emacs/src/treesit.c
{
treesit_check_parser (parser);
treesit_initialize ();
treesit_ensure_parsed (parser);
TSNode root_node = ts_tree_root_node (XTS_PARSER (parser)->tree);
return make_treesit_node (parser, root_node);
}