Function: treesit-node-children

treesit-node-children is a byte-compiled function defined in treesit.el.gz.

Signature

(treesit-node-children NODE &optional NAMED)

Documentation

Return a list of NODE's children.

If NAMED is non-nil, collect named child only.

Other relevant functions are documented in the treesit group.

View in manual

Shortdoc

;; treesit
(treesit-node-children node)
    e.g. => (#<treesit-node (primitive_type) in 1-4> #<treesit-node (init_declarator) in 5-10> #<treesit-node ";" in 10-11>)

Source Code

;; Defined in /usr/src/emacs/lisp/treesit.el.gz
(defun treesit-node-children (node &optional named)
  "Return a list of NODE's children.
If NAMED is non-nil, collect named child only."
  (mapcar (lambda (idx)
            (treesit-node-child node idx named))
          (number-sequence
           0 (1- (treesit-node-child-count node named)))))