diff options
author | Chris Lattner <sabre@nondot.org> | 2008-07-23 04:49:20 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-07-23 04:49:20 +0000 |
commit | e754764aa96fdb0266da0b13244e50f39c126c7b (patch) | |
tree | f5dfb9f41d8c347fddd966afe393c911bc437e17 /llvm/utils/emacs | |
parent | 16a84c6e2dd36985fbcb74cdcff2effbbe9953a3 (diff) | |
download | bcm5719-llvm-e754764aa96fdb0266da0b13244e50f39c126c7b.tar.gz bcm5719-llvm-e754764aa96fdb0266da0b13244e50f39c126c7b.zip |
'Previously, the emacs tablegen mode would highlight constants even if
they appear in words. This would cause things like the "128" in "VR128"
to be highlighted. This patch fixes the highlighting by only recognizing
constants when they have word breaks around them.'
Patch by Stefanus Du Toit!
llvm-svn: 53944
Diffstat (limited to 'llvm/utils/emacs')
-rw-r--r-- | llvm/utils/emacs/tablegen-mode.el | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/utils/emacs/tablegen-mode.el b/llvm/utils/emacs/tablegen-mode.el index fdf8b3f4443..08f7f252c68 100644 --- a/llvm/utils/emacs/tablegen-mode.el +++ b/llvm/utils/emacs/tablegen-mode.el @@ -26,13 +26,13 @@ ;; Strings '("\"[^\"]+\"" . font-lock-string-face) ;; Hex constants - '("0x[0-9A-Fa-f]+" . font-lock-preprocessor-face) + '("\\<0x[0-9A-Fa-f]+\\>" . font-lock-preprocessor-face) ;; Binary constants - '("0b[01]+" . font-lock-preprocessor-face) + '("\\<0b[01]+\\>" . font-lock-preprocessor-face) ;; Integer literals - '("[-]?[0-9]+" . font-lock-preprocessor-face) + '("\\<[-]?[0-9]+\\>" . font-lock-preprocessor-face) ;; Floating point constants - '("[-+]?[0-9]+\.[0-9]*\([eE][-+]?[0-9]+\)?" . font-lock-preprocessor-face) + '("\\<[-+]?[0-9]+\.[0-9]*\([eE][-+]?[0-9]+\)?\\>" . font-lock-preprocessor-face) '("^[ \t]*\\(@.+\\)" 1 'td-decorators-face) ;; Keywords |