[llvm] [emacs] More consistently highlight value keywords that appear in vectors (PR #97594)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 3 20:51:14 PDT 2024
================
@@ -61,6 +61,8 @@
`(,(concat "\\<" llvm-mode-primitive-type-regexp "\\>") . font-lock-type-face)
;; Integer literals
'("\\b[-]?[0-9]+\\b" . font-lock-preprocessor-face)
+ ;; Values that can appear in a vec
+ '("\\b\\(true\\|false\\|null\\|undef\\|poison\\|none\\)\\b" . font-lock-keyword-face)
----------------
lukel97 wrote:
I wonder if the `'words` paren argument to regexp-opt would also work? https://www.gnu.org/software/emacs/manual/html_node/elisp/Regexp-Functions.html#index-regexp_002dopt
```elisp
`(,(regexp-opt '("true" "false" "null" "undef" "none" "poison") 'words) . font-lock-keyword-face
```
https://github.com/llvm/llvm-project/pull/97594
More information about the llvm-commits
mailing list