Function: js--syntactic-context-from-pstate

js--syntactic-context-from-pstate is a byte-compiled function defined in js.el.gz.

Signature

(js--syntactic-context-from-pstate PSTATE)

Documentation

Return the JavaScript syntactic context corresponding to PSTATE.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/js.el.gz
(defun js--syntactic-context-from-pstate (pstate)
  "Return the JavaScript syntactic context corresponding to PSTATE."
  (let ((type (js--pitem-type (car pstate))))
    (cond ((memq type '(function macro))
           type)
          ((consp type)
           'class)
          (t 'toplevel))))