aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-07-23 04:49:20 +0000
committerChris Lattner <sabre@nondot.org>2008-07-23 04:49:20 +0000
commit2d7d52aa0167860e0405659ce5e75f68a704116e (patch)
treef2ec0583777ba41eb4b41d07903ae7e93845a220 /utils
parentb94a0ba70b91b6cca8f22de9cc4ebaf670d5ef95 (diff)
downloadexternal_llvm-2d7d52aa0167860e0405659ce5e75f68a704116e.zip
external_llvm-2d7d52aa0167860e0405659ce5e75f68a704116e.tar.gz
external_llvm-2d7d52aa0167860e0405659ce5e75f68a704116e.tar.bz2
'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! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53944 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/emacs/tablegen-mode.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/emacs/tablegen-mode.el b/utils/emacs/tablegen-mode.el
index fdf8b3f..08f7f25 100644
--- a/utils/emacs/tablegen-mode.el
+++ b/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