Skip to content

Commit 8431170

Browse files
authored
[emacs] More consistently highlight value keywords that appear in vectors (#97594)
Previously something like `<i8 123, i8 poison>` would not properly highlight the `poison` keyword at the end.
1 parent 24cee1c commit 8431170

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/utils/emacs/llvm-mode.el

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@
6161
`(,(concat "\\<" llvm-mode-primitive-type-regexp "\\>") . font-lock-type-face)
6262
;; Integer literals
6363
'("\\b[-]?[0-9]+\\b" . font-lock-preprocessor-face)
64+
;; Values that can appear in a vec
65+
'("\\b\\(true\\|false\\|null\\|undef\\|poison\\|none\\)\\b" . font-lock-keyword-face)
6466
;; Floating point constants
6567
'("\\b[-+]?[0-9]+.[0-9]*\\([eE][-+]?[0-9]+\\)?\\b" . font-lock-preprocessor-face)
6668
;; Hex constants
@@ -74,7 +76,7 @@
7476
"private" "internal" "weak" "weak_odr" "linkonce" "linkonce_odr" "available_externally" "appending" "common" "extern_weak" "external"
7577
"uninitialized" "implementation" "..."
7678
;; Values
77-
"true" "false" "null" "undef" "zeroinitializer" "none" "c" "asm" "blockaddress" "poison"
79+
"zeroinitializer" "c" "asm" "blockaddress"
7880

7981
;; Calling conventions
8082
"ccc" "fastcc" "coldcc" "anyregcc" "preserve_mostcc" "preserve_allcc"

0 commit comments

Comments
 (0)