[PATCH] D158290: [emacs] Highlight hexadecimal integer constants

Luke Lau via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 18 08:44:27 PDT 2023


luke created this revision.
luke added a reviewer: goldstein.w.n.
Herald added subscribers: asb, pmatos.
Herald added a project: All.
luke requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Today I learnt about their existence (D158288 <https://reviews.llvm.org/D158288>), they just need to be prefixed
with a u or s.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D158290

Files:
  llvm/utils/emacs/llvm-mode.el


Index: llvm/utils/emacs/llvm-mode.el
===================================================================
--- llvm/utils/emacs/llvm-mode.el
+++ llvm/utils/emacs/llvm-mode.el
@@ -43,7 +43,7 @@
    ;; Floating point constants
    '("\\b[-+]?[0-9]+.[0-9]*\\([eE][-+]?[0-9]+\\)?\\b" . font-lock-preprocessor-face)
    ;; Hex constants
-   '("\\b0x[0-9A-Fa-f]+\\b" . font-lock-preprocessor-face)
+   '("\\b[us]?0x[0-9A-Fa-f]+\\b" . font-lock-preprocessor-face)
    ;; Keywords
    `(,(regexp-opt
        '(;; Toplevel entities


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158290.551532.patch
Type: text/x-patch
Size: 521 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230818/a36bb855/attachment.bin>


More information about the llvm-commits mailing list