(eq (char-after) ??))))
(not (and
(eq (char-after) ?*)
- (looking-at (concat "\\* *" js--name-re " *("))
+ ;; Generator method (possibly using computed property).
+ (looking-at (concat "\\* *\\(?:\\[\\|" js--name-re " *(\\)"))
(save-excursion
- (goto-char (1- (match-end 0)))
- (let (forward-sexp-function) (forward-sexp))
- (js--forward-syntactic-ws)
- (eq (char-after) ?{)))))))
+ (js--backward-syntactic-ws)
+ ;; We might misindent some expressions that would
+ ;; return NaN anyway. Shouldn't be a problem.
+ (memq (char-before) '(?, ?} ?{))))))))
(defun js--continued-expression-p ()
"Return non-nil if the current line continues an expression."