]> git.eshelyaron.com Git - emacs.git/commit
CC Mode: Handle C++20 concepts
authorAlan Mackenzie <acm@muc.de>
Mon, 26 Sep 2022 19:16:33 +0000 (19:16 +0000)
committerAlan Mackenzie <acm@muc.de>
Mon, 26 Sep 2022 19:20:54 +0000 (19:20 +0000)
commit07e6bbb9bc68f76773e9bdf8846d64d83f50b0ea
treea7c935a05740386446ba0880a99938822e86b3ec
parentbb83fb5f62aa4b27a5598f4a0a9b22efdd94cf14
CC Mode: Handle C++20 concepts

* lisp/progmodes/cc-align.el (c-lineup-topmost-intro-cont): Amend so as not to
indent lines following a requires line.

* lisp/progmodes/cc-engine.el (c-forward-primary-expression)
(c-forward-c++-requires-clause): New functions.
(c-forward-declarator): Skip forward over any trailing requires clause.
(c-forward-decl-or-cast-1): Skip requires clauses before and after the type.
Amend the second element of the return list to include information on two
consecutive identifiers in <...>.
(c-looking-at-or-maybe-in-bracelist): Don't recognize braces in requires
expressions as brace lists.
(c-guess-basic-syntax): CASE 5D.7: New case to handle the continuation of a
"concept foo = " line.

* lisp/progmodes/cc-fonts.el (c-basic-matchers-before): Add a new clause to
handle the declaration of a concept.
(c-get-fontification-context): Treat the arglist of a requires construct as a
declaration arglist.

* lisp/progmodes/cc-langs.el (c-equals-nontype-decl-kwds/key)
(c-fun-name-substitute-kwds/key, c-pre-concept-<>-kwds/key): New
c-lang-consts/vars.
(c-constant-key): New c-lang-var.
(c-type-decl-suffix-key): Include "requires" in the keywords matched.

* lisp/progmodes/cc-mode.el (c-fl-decl-start): Fix an off by one error.  Use
equal rather than eq to compare two syntax contexts.
lisp/progmodes/cc-align.el
lisp/progmodes/cc-engine.el
lisp/progmodes/cc-fonts.el
lisp/progmodes/cc-langs.el
lisp/progmodes/cc-mode.el