Eo: Add numbers highlighting.
This commit is contained in:
parent
8f3d9d1142
commit
1cacb7c92d
|
@ -38,6 +38,30 @@ syn region eoBlock start="{" end="}" transparent fold
|
|||
|
||||
syn region eo_comment start="\/\*" end="\*\/" contains=@eoCommentGroup
|
||||
|
||||
" Numbers
|
||||
"integer number, or floating point number without a dot and with "f".
|
||||
syn case ignore
|
||||
syn match eoNumbers display transparent "\<\d\|\.\d" contains=eoNumber,eoFloat,eoOctalError,eoOctal
|
||||
" Same, but without octal error (for comments)
|
||||
syn match eoNumbersCom display contained transparent "\<\d\|\.\d" contains=eoNumber,eoFloat,eoOctal
|
||||
syn match eoNumber display contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>"
|
||||
"hex number
|
||||
syn match eoNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>"
|
||||
" Flag the first zero of an octal number as something special
|
||||
syn match eoOctal display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=eoOctalZero
|
||||
syn match eoOctalZero display contained "\<0"
|
||||
syn match eoFloat display contained "\d\+f"
|
||||
"floating point number, with dot, optional exponent
|
||||
syn match eoFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\="
|
||||
"floating point number, starting with a dot, optional exponent
|
||||
syn match eoFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"
|
||||
"floating point number, without dot, with exponent
|
||||
syn match eoFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>"
|
||||
|
||||
" flag an octal number with wrong digits
|
||||
syn match eoOctalError display contained "0\o*[89]\d*"
|
||||
syn case match
|
||||
|
||||
hi def link eoClassBodyLabels Label
|
||||
hi def link eoClassBodyBlockOpener Label
|
||||
hi def link eoInnerBlockOpener Label
|
||||
|
@ -50,6 +74,13 @@ hi def link eoConstants Constant
|
|||
hi def link className Identifier
|
||||
hi def link eoStatements Statement
|
||||
|
||||
hi def link eoFloat Float
|
||||
hi def link eoOctal Number
|
||||
hi def link eoOctalZero Number
|
||||
hi def link eoNumber Number
|
||||
hi def link eoNumbers Number
|
||||
hi def link eoNumbersCom Number
|
||||
|
||||
hi def link eoStructure Structure
|
||||
hi def link eoClassTypes Structure
|
||||
|
||||
|
|
Loading…
Reference in New Issue