Eo: Rewrite and clean the syntax file.

This commit is contained in:
Tom Hacohen 2014-07-31 05:58:03 +01:00
parent a47fed45d7
commit f4a6c84e82
1 changed files with 14 additions and 18 deletions

View File

@ -4,34 +4,30 @@
" Last Change: 2014 06 01
" 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 constructors properties methods implements events contained
syn keyword functionKeywords set get keys values params constructor destructor finalize const contained return
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="\*\/"
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508
if version < 508
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
hi def link classKeywords Function
hi def link functionKeywords Label
hi def link attributes Constant
hi def link eo_comment Comment
hi def link eoBoolean Boolean
hi def link eoConstants Constant
HiLink classKeywords Function
HiLink functionKeywords Label
HiLink attributes Constant
HiLink eo_comment Comment
delcommand HiLink
endif
hi def link eoType Type
let b:current_syntax = "eo"