Function: c-looking-at-c++-lambda-expression
c-looking-at-c++-lambda-expression is a byte-compiled function defined
in cc-engine.el.gz.
Signature
(c-looking-at-c++-lambda-expression &optional LIM)
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/cc-engine.el.gz
(defun c-looking-at-c++-lambda-expression (&optional lim)
;; If point is at the [ opening a C++ lambda expressions's capture list,
;; and the lambda expression is complete, return the position of the { which
;; opens the body form, otherwise return nil. LIM is the limit for forward
;; searching for the {.
(let ((here (point))
(lim-or-max (or lim (point-max)))
got-params)
(when (and (c-looking-at-c++-lambda-capture-list)
(c-go-list-forward nil lim))
(c-forward-syntactic-ws lim)
(when (and (eq (char-after) ?<)
(c-forward-<>-arglist t))
(c-forward-syntactic-ws lim)
(when (looking-at c-requires-clause-key)
(c-forward-c++-requires-clause lim nil)))
(when (looking-at "\\_<\\(alignas\\)\\_>")
(c-forward-keyword-clause 1))
(when (and (eq (char-after) ?\()
(c-go-list-forward nil lim))
(setq got-params t)
(c-forward-syntactic-ws lim))
(while (and c-lambda-spec-key (looking-at c-lambda-spec-key))
(goto-char (match-end 1))
(c-forward-syntactic-ws lim))
(let (after-except-pos)
(while
(and (<= (point) lim-or-max)
(cond
((save-excursion
(and (looking-at "\\_<throw\\_>")
(progn (goto-char (match-beginning 1))
(c-forward-syntactic-ws lim)
(eq (char-after) ?\())
(c-go-list-forward nil lim)
(progn (c-forward-syntactic-ws lim)
(setq after-except-pos (point)))))
(goto-char after-except-pos)
(c-forward-syntactic-ws lim)
t)
((looking-at c-paren-nontype-key) ; "noexcept" or "alignas"
(c-forward-keyword-clause 1))))))
(and (<= (point) lim-or-max)
(looking-at c-haskell-op-re)
(goto-char (match-end 0))
(progn (c-forward-syntactic-ws lim)
(c-forward-type t))) ; t is BRACE-BLOCK-TOO.
(and got-params
(<= (point) lim-or-max)
(looking-at c-requires-clause-key)
(c-forward-c++-requires-clause lim nil))
(prog1 (and (<= (point) lim-or-max)
(eq (char-after) ?{)
(point))
(goto-char here)))))