codekingpro/portable-devtools
115k
1" Vim syntax file2" Language: DataScript3" Maintainer: Dominique Pelle <dominique.pelle@gmail.com>4" Last Change: 2015 Jul 305"6" DataScript is a formal language for modelling binary datatypes,7" bitstreams or file formats. For more information, see:8"9" http://dstools.sourceforge.net/DataScriptLanguageOverview.html10 11" quit when a syntax file was already loaded12if exists("b:current_syntax")13 finish14endif15let s:keepcpo= &cpo16set cpo&vim17 18syn keyword dsPackage import package19syn keyword dsType bit bool string20syn keyword dsType int int8 int16 int32 int6421syn keyword dsType uint8 uint16 uint32 uint6422syn keyword dsType varint16 varint32 varint6423syn keyword dsType varuint16 varuint32 varuint6424syn keyword dsType leint16 leint32 leint6425syn keyword dsType leuint16 leuint32 leuint6426syn keyword dsEndian little big27syn keyword dsAlign align28syn keyword dsLabel case default29syn keyword dsConditional if condition30syn keyword dsBoolean true false31syn keyword dsCompound union choice on enum bitmask subtype explicit32syn keyword dsKeyword function return33syn keyword dsOperator sizeof bitsizeof lengthof is sum forall in34syn keyword dsStorageClass const35syn keyword dsTodo contained TODO FIXME XXX36syn keyword dsSql sql sql_table sql_database sql_pragma sql_index37syn keyword dsSql sql_integer sql_metadata sql_key sql_virtual38syn keyword dsSql using reference_key foreign_key to39 40" dsCommentGroup allows adding matches for special things in comments.41syn cluster dsCommentGroup contains=dsTodo42 43syn match dsOffset display "^\s*[a-zA-Z_:\.][a-zA-Z0-9_:\.]*\s*:"44 45syn match dsNumber display "\<\d\+\>"46syn match dsNumberHex display "\<0[xX]\x\+\>"47syn match dsNumberBin display "\<[01]\+[bB]\>" contains=dsBinaryB48syn match dsBinaryB display contained "[bB]\>"49syn match dsOctal display "\<0\o\+\>" contains=dsOctalZero50syn match dsOctalZero display contained "\<0"51 52syn match dsOctalError display "\<0\o*[89]\d*\>"53 54syn match dsCommentError display "\*/"55syn match dsCommentStartError display "/\*"me=e-1 contained56 57syn region dsCommentL58 \ start="//" skip="\\$" end="$" keepend59 \ contains=@dsCommentGroup,@Spell60syn region dsComment61 \ matchgroup=dsCommentStart start="/\*" end="\*/"62 \ contains=@dsCommentGroup,dsCommentStartError,@Spell extend63 64syn region dsString65 \ start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell66 67syn sync ccomment dsComment68 69" Define the default highlighting.70hi def link dsType Type71hi def link dsEndian StorageClass72hi def link dsStorageClass StorageClass73hi def link dsAlign Label74hi def link dsLabel Label75hi def link dsOffset Label76hi def link dsSql PreProc77hi def link dsCompound Structure78hi def link dsConditional Conditional79hi def link dsBoolean Boolean80hi def link dsKeyword Statement81hi def link dsString String82hi def link dsNumber Number83hi def link dsNumberBin Number84hi def link dsBinaryB Special85hi def link dsOctal Number86hi def link dsOctalZero Special87hi def link dsOctalError Error88hi def link dsNumberHex Number89hi def link dsTodo Todo90hi def link dsOperator Operator91hi def link dsPackage Include92hi def link dsCommentError Error93hi def link dsCommentStartError Error94hi def link dsCommentStart dsComment95hi def link dsCommentL dsComment96hi def link cCommentL dsComment97hi def link dsComment Comment98 99let b:current_syntax = "datascript"100 101let &cpo = s:keepcpo102unlet s:keepcpo103 