Function: treesit-node-text
treesit-node-text is a byte-compiled function defined in
treesit.el.gz.
Signature
(treesit-node-text NODE &optional NO-PROPERTY)
Documentation
Return the buffer (or string) content corresponding to NODE.
If optional argument NO-PROPERTY is non-nil, remove text properties.
Other relevant functions are documented in the treesit group.
Shortdoc
;; treesit
(treesit-node-text node)
e.g. => "int"
Source Code
;; Defined in /usr/src/emacs/lisp/treesit.el.gz
(defun treesit-node-text (node &optional no-property)
"Return the buffer (or string) content corresponding to NODE.
If optional argument NO-PROPERTY is non-nil, remove text
properties."
(when node
(with-current-buffer (treesit-node-buffer node)
(if no-property
(buffer-substring-no-properties
(treesit-node-start node)
(treesit-node-end node))
(buffer-substring
(treesit-node-start node)
(treesit-node-end node))))))