Function: parseclj-single-value-p

parseclj-single-value-p is a byte-compiled function defined in parseclj-parser.el.

Signature

(parseclj-single-value-p STACK VALUE-P)

Documentation

Return t if STACK only has a single node for which VALUE-P is true.

This checks if the stack contains a single, fully reduced value, and no dangling unmatched tokens. When parsing with :read-one this indicates a form can be returned.

Source Code

;; Defined in ~/.emacs.d/elpa/parseclj-20261002.1230/parseclj-parser.el
(defun parseclj-single-value-p (stack value-p)
  "Return t if STACK only has a single node for which VALUE-P is true.

This checks if the stack contains a single, fully reduced value, and no
dangling unmatched tokens.  When parsing with `:read-one' this indicates a
form can be returned."
  (and (not (cl-reduce (lambda (bool node)
                         (or bool (parseclj-lex-token-p node)))
                       stack
                       :initial-value nil))
       (parseclj--take-value stack value-p)))