Fix fontification of C++ reference return types (bug#60441)

* lisp/progmodes/c-ts-mode.el (c-ts-fontify-error): Treat
reference_declarator nodes the same as pointer_declarator nodes when
calculating the identifier to fontify.
This commit is contained in:
Daniel Martín 2022-12-31 01:45:27 +01:00 committed by Yuan Fu
parent 1864b65af6
commit 84e7c2fbc8
No known key found for this signature in database
GPG key ID: 56E19BC57664A442

View file

@ -425,7 +425,7 @@ MODE is either `c' or `cpp'."
;; Recurse.
((or "attributed_declarator" "parenthesized_declarator")
(c-ts-mode--declarator-identifier (treesit-node-child node 0 t)))
("pointer_declarator"
((or "pointer_declarator" "reference_declarator")
(c-ts-mode--declarator-identifier (treesit-node-child node -1)))
((or "function_declarator" "array_declarator" "init_declarator")
(c-ts-mode--declarator-identifier