codekingpro/portable-devtools
114k
1" Vim syntax file2" Language: Zserio3" Maintainer: Dominique Pellé <dominique.pelle@gmail.com>4" Last Change: 2023 Jun 185"6" Zserio is a serialization schema language for modeling binary7" data types, bitstreams or file formats. Based on the zserio8" language it is possible to automatically generate encoders and9" decoders for a given schema in various target languages10" (e.g. Java, C++, Python).11"12" Zserio is an evolution of the DataScript language.13"14" For more information, see:15" - http://zserio.org/16" - https://github.com/ndsev/zserio17 18" quit when a syntax file was already loaded19if exists("b:current_syntax")20 finish21endif22 23let s:keepcpo= &cpo24set cpo&vim25 26syn case match27 28syn keyword zserioPackage import package zserio_compatibility_version29syn keyword zserioType bit bool string30syn keyword zserioType int int8 int16 int32 int6431syn keyword zserioType uint8 uint16 uint32 uint6432syn keyword zserioType float16 float32 float6433syn keyword zserioType varint varint16 varint32 varint6434syn keyword zserioType varuint varsize varuint16 varuint32 varuint6435syn keyword zserioAlign align36syn keyword zserioLabel case default37syn keyword zserioConditional if condition38syn keyword zserioBoolean true false39syn keyword zserioCompound struct union choice on enum bitmask subtype40syn keyword zserioKeyword function return41syn keyword zserioOperator lengthof valueof instanceof numbits isset42syn keyword zserioRpc service pubsub topic publish subscribe43syn keyword zserioRule rule_group rule44syn keyword zserioStorageClass const implicit packed instantiate45syn keyword zserioTodo contained TODO FIXME XXX46syn keyword zserioSql sql sql_table sql_database sql_virtual sql_without_rowid47syn keyword zserioSql explicit using48 49" zserioCommentGroup allows adding matches for special things in comments.50syn cluster zserioCommentGroup contains=zserioTodo51 52syn match zserioOffset display "^\s*[a-zA-Z_:\.][a-zA-Z0-9_:\.]*\s*:"53 54syn match zserioNumber display "\<\d\+\>"55syn match zserioNumberHex display "\<0[xX]\x\+\>"56syn match zserioNumberBin display "\<[01]\+[bB]\>" contains=zserioBinaryB57syn match zserioBinaryB display contained "[bB]\>"58syn match zserioOctal display "\<0\o\+\>" contains=zserioOctalZero59syn match zserioOctalZero display contained "\<0"60 61syn match zserioOctalError display "\<0\o*[89]\d*\>"62 63syn match zserioCommentError display "\*/"64syn match zserioCommentStartError display "/\*"me=e-1 contained65 66syn region zserioCommentL67 \ start="//" skip="\\$" end="$" keepend68 \ contains=@zserioCommentGroup,@Spell69syn region zserioComment70 \ matchgroup=zserioCommentStart start="/\*" end="\*/"71 \ contains=@zserioCommentGroup,zserioCommentStartError,@Spell extend72 73syn region zserioString74 \ start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell75 76syn sync ccomment zserioComment77 78" Define the default highlighting.79hi def link zserioType Type80hi def link zserioEndian StorageClass81hi def link zserioStorageClass StorageClass82hi def link zserioAlign Label83hi def link zserioLabel Label84hi def link zserioOffset Label85hi def link zserioSql PreProc86hi def link zserioCompound Structure87hi def link zserioConditional Conditional88hi def link zserioBoolean Boolean89hi def link zserioKeyword Statement90hi def link zserioRpc Keyword91hi def link zserioRule Keyword92hi def link zserioString String93hi def link zserioNumber Number94hi def link zserioNumberBin Number95hi def link zserioBinaryB Special96hi def link zserioOctal Number97hi def link zserioOctalZero Special98hi def link zserioOctalError Error99hi def link zserioNumberHex Number100hi def link zserioTodo Todo101hi def link zserioOperator Operator102hi def link zserioPackage Include103hi def link zserioCommentError Error104hi def link zserioCommentStartError Error105hi def link zserioCommentStart zserioComment106hi def link zserioCommentL zserioComment107hi def link zserioComment Comment108 109let b:current_syntax = "zserio"110 111let &cpo = s:keepcpo112unlet s:keepcpo113 