; Move c-ts-mode keyword variables forward
* lisp/progmodes/c-ts-mode.el (c-ts-mode--type-keywords): (c-ts-mode--operators): (c-ts-mode--c++-operators): (c-ts-mode--c++-operator-keywords): Move before c-ts-mode--keywords to avoid undefined variable error.
This commit is contained in:
parent
8cfa3447b7
commit
4687fff4f0
1 changed files with 19 additions and 19 deletions
|
@ -635,6 +635,25 @@ NODE, PARENT, BOL, ARGS are as usual."
|
|||
"__fastcall" "__thiscall" "__vectorcall" "_unaligned" "__unaligned")
|
||||
"MSVC keywords.")
|
||||
|
||||
(defvar c-ts-mode--type-keywords
|
||||
'("long" "short" "signed" "unsigned")
|
||||
"Keywords that should be considered as part of a type.")
|
||||
|
||||
(defvar c-ts-mode--operators
|
||||
'("=" "-" "*" "/" "+" "%" "~" "|" "&" "^" "<<" ">>" "->"
|
||||
"." "<" "<=" ">=" ">" "==" "!=" "!" "&&" "||" "-="
|
||||
"+=" "*=" "/=" "%=" "|=" "&=" "^=" ">>=" "<<=" "--" "++")
|
||||
"C/C++ operators for tree-sitter font-locking.")
|
||||
|
||||
(defvar c-ts-mode--c++-operators
|
||||
'(".*" "->*" "<=>")
|
||||
"C++ operators that aren't supported by C.")
|
||||
|
||||
(defvar c-ts-mode--c++-operator-keywords
|
||||
'("and" "and_eq" "bitand" "bitor" "compl" "not" "not_eq" "or" "or_eq"
|
||||
"xor" "xor_eq")
|
||||
"C++ operators that we fontify as keywords.")
|
||||
|
||||
(defun c-ts-mode--compute-optional-keywords (mode)
|
||||
"Return a list of keywords that are supported by the grammar.
|
||||
MODE should be either `c' or `cpp'."
|
||||
|
@ -678,25 +697,6 @@ MODE is either `c' or `cpp'."
|
|||
"thread_local"))
|
||||
(append '("auto") c-keywords))))
|
||||
|
||||
(defvar c-ts-mode--type-keywords
|
||||
'("long" "short" "signed" "unsigned")
|
||||
"Keywords that should be considered as part of a type.")
|
||||
|
||||
(defvar c-ts-mode--operators
|
||||
'("=" "-" "*" "/" "+" "%" "~" "|" "&" "^" "<<" ">>" "->"
|
||||
"." "<" "<=" ">=" ">" "==" "!=" "!" "&&" "||" "-="
|
||||
"+=" "*=" "/=" "%=" "|=" "&=" "^=" ">>=" "<<=" "--" "++")
|
||||
"C/C++ operators for tree-sitter font-locking.")
|
||||
|
||||
(defvar c-ts-mode--c++-operators
|
||||
'(".*" "->*" "<=>")
|
||||
"C++ operators that aren't supported by C.")
|
||||
|
||||
(defvar c-ts-mode--c++-operator-keywords
|
||||
'("and" "and_eq" "bitand" "bitor" "compl" "not" "not_eq" "or" "or_eq"
|
||||
"xor" "xor_eq")
|
||||
"C++ operators that we fontify as keywords.")
|
||||
|
||||
(defvar c-ts-mode--for-each-tail-regexp
|
||||
(rx "FOR_EACH_" (or "TAIL" "TAIL_SAFE" "ALIST_VALUE"
|
||||
"LIVE_BUFFER" "FRAME"))
|
||||
|
|
Loading…
Add table
Reference in a new issue