Function: web-mode-jsx-scan-element

web-mode-jsx-scan-element is a natively compiled function defined in web-mode.el.

Signature

(web-mode-jsx-scan-element REG-BEG REG-END DEPTH)

Source Code

;; Defined in /nix/store/2qgnz1rp30nzfz6w0apx4kdm14if1bbs-emacs-packages-deps/share/emacs/site-lisp/elpa/web-mode-20260831.219/web-mode.el
;; http://facebook.github.io/jsx/
;; https://github.com/facebook/jsx/blob/master/AST.md
(defun web-mode-jsx-scan-element (reg-beg reg-end depth)
  (unless depth (setq depth 1))
  ;;(message "%S %S | %S" reg-beg reg-end depth)
  (save-excursion
    (goto-char reg-beg)
    (put-text-property reg-beg (1+ reg-beg) 'jsx-beg depth)
    (put-text-property (1- reg-end) reg-end 'jsx-end depth)
    (put-text-property reg-beg reg-end 'jsx-depth depth)
    (remove-list-of-text-properties reg-beg reg-end '(tag-beg tag-end tag-name tag-type tag-attr tag-attr-beg tag-attr-end))
    (goto-char reg-beg)
    (web-mode-scan-elements reg-beg reg-end)
    (web-mode-jsx-scan-expression reg-beg reg-end (1+ depth))
    ))