codekingpro/portable-devtools
114k
1" Vim syntax file2" Language: Slice (ZeroC's Specification Language for Ice)3" Maintainer: Morel Bodin <slice06@nym.hush.com>4" Last Change: 2005 Dec 035 6" quit when a syntax file was already loaded7if exists("b:current_syntax")8 finish9endif10 11" The Slice keywords12 13syn keyword sliceType bool byte double float int long short string void14syn keyword sliceQualifier const extends idempotent implements local nonmutating out throws15syn keyword sliceConstruct class enum exception dictionary interface module LocalObject Object sequence struct16syn keyword sliceQualifier const extends idempotent implements local nonmutating out throws17syn keyword sliceBoolean false true18 19" Include directives20syn region sliceIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+21syn match sliceIncluded display contained "<[^>]*>"22syn match sliceInclude display "^\s*#\s*include\>\s*["<]" contains=sliceIncluded23 24" Double-include guards25syn region sliceGuard start="^#\(define\|ifndef\|endif\)" end="$"26 27" Strings and characters28syn region sliceString start=+"+ end=+"+29 30" Numbers (shamelessly ripped from c.vim, only slightly modified)31"integer number, or floating point number without a dot and with "f".32syn case ignore33syn match sliceNumbers display transparent "\<\d\|\.\d" contains=sliceNumber,sliceFloat,sliceOctal34syn match sliceNumber display contained "\d\+"35"hex number36syn match sliceNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>"37" Flag the first zero of an octal number as something special38syn match sliceOctal display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=sliceOctalZero39syn match sliceOctalZero display contained "\<0"40syn match sliceFloat display contained "\d\+f"41"floating point number, with dot, optional exponent42syn match sliceFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\="43"floating point number, starting with a dot, optional exponent44syn match sliceFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"45"floating point number, without dot, with exponent46syn match sliceFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>"47" flag an octal number with wrong digits48syn case match49 50 51" Comments52syn region sliceComment start="/\*" end="\*/"53syn match sliceComment "//.*"54 55syn sync ccomment sliceComment56 57" Define the default highlighting.58" Only when an item doesn't have highlighting yet59 60hi def link sliceComment Comment61hi def link sliceConstruct Keyword62hi def link sliceType Type63hi def link sliceString String64hi def link sliceIncluded String65hi def link sliceQualifier Keyword66hi def link sliceInclude Include67hi def link sliceGuard PreProc68hi def link sliceBoolean Boolean69hi def link sliceFloat Number70hi def link sliceNumber Number71hi def link sliceOctal Number72hi def link sliceOctalZero Special73hi def link sliceNumberError Special74 75 76let b:current_syntax = "slice"77 78" vim: ts=879 