'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
This commit is contained in:
Chris Lattner 2008-07-23 04:49:20 +00:00
parent 16a84c6e2d
commit e754764aa9
1 changed files with 4 additions and 4 deletions

View File

@ -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