if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn clear syn sync fromstart syn match microNumber /\<[0-9]\d*\>/ syn match microEscapeHex /\\x\x{2}/ transparent contained syn match microEscapeChar /\\[nt\\']/ transparent contained syn match microEscapeString /\\[nt\\"]/ transparent contained syn cluster microCharacterGroup contains=microEscapeChar,microEscapeHex syn region microCharacter start=/'/ skip=/\\\\\|\\'/ end=/'/ contains=@microCharacterGroup syn cluster microStringGroup contains=microEscapeString,microEscapeHex syn region microString start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=@Spell,microStringGroup syn keyword microConditional if else continue break syn keyword microRepeat for in syn keyword microType number bool string func syn keyword microBoolean true false syn keyword microKeyword len syn keyword microStatement return nextgroup=microTagE skipwhite skipempty syn match microTagE /!?/ display contained "" this is probably not correct syn match microOperator display "?\|+\|-\|/\|*\|=\|=\|\^\|&\||\|!\|!=\|>\|>=\|<\|<=\|\~\|%" syn match microOperator display "&&\|||" syn keyword microKeyword def nextgroup=microFuncName skipwhite skipempty syn match microFuncName /[_a-zA-Z][_a-zA-Z0-9]*/ nextgroup=microFuncParams display contained syn region microFuncParams start=/(/ end=/)/ contains=microVarIdent,microNumber,microChar nextgroup=microVarType,microVarArray skipwhite contained syn match mucroPropStart /\./ nextgroup=microProp skipwhite syn match microProp /[_a-zA-Z][_a-zA-Z0-9]*/ display contained syn keyword microKeyword var nextgroup=microVarIdent skipwhite skipempty syn keyword microKeyword const nextgroup=microVarIdent skipwhite skipempty syn match microVarIdent /[_a-zA-Z][_a-zA-Z0-9]*/ nextgroup=microVarType,microVarArray skipwhite syn match microVarArray /\[[0-9]*\]/ nextgroup=microVarType transparent contained skipwhite syn match microVarType /[_a-zA-Z][_a-zA-Z0-9]*/ display contained syn match microCall /[_a-zA-Z][_a-zA-Z0-9]*(/he=e-1,me=e-1 syn region microIndex start=/\[/ end=/\]/ contains=microNumber,microChar,microIndexIdent,microIndexCall syn match microIndexIdent /[_a-zA-Z][_a-zA-Z0-9]*/ display contained syn match microIndexCall /[_a-zA-Z][_a-zA-Z0-9]*(/he=e-1,me=e-1 display contained syn keyword microBuiltin println panic syn region microBlock start="{" end="}" transparent fold syn keyword microCommentTodo TODO FIXME XXX BUG contained syn match microLineComment "\/\/.*" contains=@Spell,microCommentTodo hi def link microLineComment Comment hi def link microCommentTodo Todo hi def link microNumber Number hi def link microCharacter Character hi def link microString String hi def link microStrEmbeddedQuote String hi def link microConditional Conditional hi def link microRepeat Repeat hi def link microOperator Operator hi def link microType Type hi def link microVarType Type hi def link microBoolean Boolean hi def link microKeyword Keyword hi def link microStatement Statement hi def link microTagE Keyword hi def link microBuiltin Function hi def link microFuncName Function hi def link microCall Function hi def link microProp Identifier hi def link microIndexIdent Number hi def link microIndexCall Function let b:current_syntax = "micro" let &cpo = s:cpo_save unlet s:cpo_save