Fix for grammar change of keyword "virtual" in tree-sitter-cpp
The new rule works with both the new (>= 0.22.1) and the old (<= 0.22.0) grammar libraries. * lisp/progmodes/c-ts-mode.el (c-ts-mode--keywords): Removed the keyword "virtual". * lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings): New font lock rule. (Bug#71518)
This commit is contained in:
parent
fa364a0d46
commit
014aab9847
1 changed files with 3 additions and 2 deletions
|
@ -572,7 +572,7 @@ MODE is either `c' or `cpp'."
|
|||
"not" "not_eq" "operator" "or"
|
||||
"or_eq" "override" "private" "protected"
|
||||
"public" "requires" "template" "throw"
|
||||
"try" "typename" "using" "virtual"
|
||||
"try" "typename" "using"
|
||||
"xor" "xor_eq"))
|
||||
(append '("auto") c-keywords))))
|
||||
|
||||
|
@ -635,7 +635,8 @@ MODE is either `c' or `cpp'."
|
|||
`([,@(c-ts-mode--keywords mode)] @font-lock-keyword-face
|
||||
,@(when (eq mode 'cpp)
|
||||
'((auto) @font-lock-keyword-face
|
||||
(this) @font-lock-keyword-face)))
|
||||
(this) @font-lock-keyword-face
|
||||
(virtual) @font-lock-keyword-face)))
|
||||
|
||||
:language mode
|
||||
:feature 'operator
|
||||
|
|
Loading…
Add table
Reference in a new issue