Function: js--looking-at-operator-p
js--looking-at-operator-p is a byte-compiled function defined in
js.el.gz.
Signature
(js--looking-at-operator-p)
Documentation
Return non-nil if point is on a JavaScript operator, other than a comma.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/js.el.gz
(defun js--looking-at-operator-p ()
"Return non-nil if point is on a JavaScript operator, other than a comma."
(save-match-data
(and (looking-at js--indent-operator-re)
(or (not (eq (char-after) ?:))
(save-excursion
(js--backward-syntactic-ws)
(when (= (char-before) ?\)) (backward-list))
(and (js--re-search-backward "[?:{]\\|\\_<case\\_>" nil t)
(eq (char-after) ??))))
(not (and
(eq (char-after) ?/)
(save-excursion
(eq (nth 3 (syntax-ppss)) ?/))))
(not (and
(eq (char-after) ?*)
;; Generator method (possibly using computed property).
(looking-at (concat "\\* *\\(?:\\[\\|" js--name-re " *(\\)"))
(save-excursion
(js--backward-syntactic-ws)
;; We might misindent some expressions that would
;; return NaN anyway. Shouldn't be a problem.
(memq (char-before) '(?, ?} ?{)))))
;; “<” isn’t necessarily an operator in JSX.
(not (and js-jsx-syntax (js-jsx--looking-at-start-tag-p))))))