Eo: Rewrite and clean the syntax file.
This commit is contained in:
parent
a47fed45d7
commit
f4a6c84e82
|
@ -4,34 +4,30 @@
|
||||||
" Last Change: 2014 06 01
|
" Last Change: 2014 06 01
|
||||||
|
|
||||||
" A bunch of useful keywords
|
" A bunch of useful keywords
|
||||||
|
syn keyword eoBoolean false true
|
||||||
|
syn keyword eoConstants null
|
||||||
|
|
||||||
|
syn keyword eoType int uint bool char uchar byte ubyte double float
|
||||||
|
|
||||||
syn keyword classKeywords class abstract legacy_prefix eo_prefix data contained
|
syn keyword classKeywords class abstract legacy_prefix eo_prefix data contained
|
||||||
syn keyword classKeywords constructors properties methods implements events contained
|
syn keyword classKeywords constructors properties methods implements events contained
|
||||||
|
|
||||||
syn keyword functionKeywords set get keys values params constructor destructor finalize const contained return
|
syn keyword functionKeywords set get keys values params constructor destructor finalize const contained return
|
||||||
|
|
||||||
syn match classKeywordsMatch "\w\+" contains=classKeywords,functionKeywords
|
syn match classKeywordsMatch "\w\+" contains=classKeywords,functionKeywords
|
||||||
syn match className "(\w\+::)*\w"
|
syn match className "(\w\+\.)*\w\+"
|
||||||
|
|
||||||
syn match attributes "@\(inout\|out\|in\|class\)"
|
syn match attributes "@\(inout\|out\|in\|class\|const\|extern\|protected\|constructor\|nonull\|warn_unused\)"
|
||||||
|
|
||||||
syn region eo_comment start="\/\*" end="\*\/"
|
syn region eo_comment start="\/\*" end="\*\/"
|
||||||
|
|
||||||
" Define the default highlighting.
|
hi def link classKeywords Function
|
||||||
" For version 5.7 and earlier: only when not done already
|
hi def link functionKeywords Label
|
||||||
" For version 5.8 and later: only when an item doesn't have highlighting yet
|
hi def link attributes Constant
|
||||||
if version >= 508
|
hi def link eo_comment Comment
|
||||||
if version < 508
|
hi def link eoBoolean Boolean
|
||||||
command -nargs=+ HiLink hi link <args>
|
hi def link eoConstants Constant
|
||||||
else
|
|
||||||
command -nargs=+ HiLink hi def link <args>
|
|
||||||
endif
|
|
||||||
|
|
||||||
HiLink classKeywords Function
|
hi def link eoType Type
|
||||||
HiLink functionKeywords Label
|
|
||||||
HiLink attributes Constant
|
|
||||||
HiLink eo_comment Comment
|
|
||||||
|
|
||||||
delcommand HiLink
|
|
||||||
endif
|
|
||||||
|
|
||||||
let b:current_syntax = "eo"
|
let b:current_syntax = "eo"
|
||||||
|
|
Loading…
Reference in New Issue