Function: treesit--pre-syntax-ppss
treesit--pre-syntax-ppss is a byte-compiled function defined in
treesit.el.gz.
Signature
(treesit--pre-syntax-ppss START END)
Documentation
Force reparse and consequently run all notifiers.
Similar to font-lock, we want to update the syntax text
property before syntax-ppss starts working on the text. We
also want to extend the to-be-propertized region to include the
whole region affected by the last reparse.
START and END mark the current to-be-propertized region.
Source Code
;; Defined in /usr/src/emacs/lisp/treesit.el.gz
(defun treesit--pre-syntax-ppss (start end)
"Force reparse and consequently run all notifiers.
Similar to font-lock, we want to update the `syntax' text
property before `syntax-ppss' starts working on the text. We
also want to extend the to-be-propertized region to include the
whole region affected by the last reparse.
START and END mark the current to-be-propertized region."
(treesit--pre-redisplay)
;; `treesit--syntax-propertize-start' is set by
;; `treesit--font-lock-mark-ranges-to-fontify', which is called after
;; each re-parser on the primary parser and in
;; `treesit--pre-redisplay'.
(let ((new-start treesit--syntax-propertize-start))
(if (and new-start (< new-start start))
(progn
(setq treesit--syntax-propertize-start nil)
(cons (max new-start (point-min)) end))
nil)))