Function: combobulate-toml-pretty-print-node-name

combobulate-toml-pretty-print-node-name is a natively compiled function defined in combobulate-toml.el.

Signature

(combobulate-toml-pretty-print-node-name NODE DEFAULT-NAME)

Documentation

Pretty print the name of NODE.

Source Code

;; Defined in /nix/store/b5fvrwzi3zvkabyzx0in6gw1cj963z46-emacs-packages-deps/share/emacs/site-lisp/combobulate-toml.el
(defun combobulate-toml-pretty-print-node-name (node default-name)
  "Pretty print the name of NODE."
  (combobulate-string-truncate
   (pcase (combobulate-node-type node)
     ("table" (concat "[" (combobulate-node-text (combobulate-node-child node 0)) "]"))
     ("table_array_element" (concat "[[" (combobulate-node-text (combobulate-node-child node 0)) "]]"))
     ("pair" (concat
              (combobulate-node-text (combobulate-node-child node 0))))
     ("string" (concat (combobulate-node-text node)))
     ;; ("bare_key" (concat (combobulate-node-text (combobulate-node-next-sibling node))))
     (_ default-name))
   40))