" Vim syntax file " Language: LibTPT " Maintainer: Isaac Foraker " Last Change: 2002 Sep 9 " Location: http://tazthecat.net/~isaac/libtpt/pub/libtpt.vim " Filenames: *.tpt *.tph " " Please download most recent version first before mailing any comments. " " This file has been built on my non-existent knowledge of Vim syntax " highlighting, using whatever I could steal from other syntax files. " If you think you can do a better job, be my guest. " " Remove any old syntax stuff that was loaded (5.x) or quit when a syntax file " was already loaded (6.x). if version < 600 syntax clear elseif exists("b:current_syntax") finish endif " TPT keywords " syn keyword tptConditional @if @elsif syn keyword tptConditional @else nextgroup=tptElseIfError skipwhite skipnl skipempty syn keyword tptRepeat @while @foreach syn keyword tptOperator @set @macro @exists @empty syn keyword tptInclude @include syn keyword tptStatementControl @last @next syn keyword tptStatementScalar @lc @length @uc @size syn keyword tptTodo TODO TBD FIXME XXX contained " Identifiers syn region tptIdent start="\${" skip="\\}\|\\\\" end="}" contains=makeStatement,makeIdent " Functions syn match tptVarPlain "\\\=\([@%$]\|\$#\)\$*\(\I\i*\)\=\(\(::\|'\)\I\i*\)*\>" nextgroup=tptVarMember,tptVarSimpleMember syn match tptFunctionName "\\\=&\$*\(\I\i*\)\=\(\(::\|'\)\I\i*\)*\>" nextgroup=tptVarMember,tptVarSimpleMember " Possible errors " " Highlight lines with only whitespace (only in blank delimited here documents) as errors syn match tptNotEmptyLine "^\s\+$" contained " Highlight '} else if (...) {', it should be '} else { if (...) { ' or " '} elsif (...) {'. syn keyword tptElseIfError if contained syn match tptNumber "[-+]\=\(\<\d[[:digit:]_]*L\=\>\|0[xX]\x[[:xdigit:]_]*\>\)" " Highlight backlash escape sequences syn match tptSpecial "\\\(x\x\+\|\o\{1,3}\|.\|$\)" " Highlight Strings syn region tptString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial " Functions " @macro (id, prototype) { " syn region tptFunction start="\s*@macro\>" end="[{]"he=e-1 syn keyword tptStatementSub @macro contained " Comments syn match tptComment "@#.*" contains=tptTodo " The default highlighting. hi link tptInclude Include hi link tptSpecial Special hi link tptString String hi link tptIdent Identifier hi link tptLabel Label hi link tptStatement Statement hi link tptConditional Conditional hi link tptRepeat Repeat hi link tptOperator Operator hi link tptFunction Function hi link tptComment Comment hi link tptTodo Todo hi link tptBrackets Error hi link tptVarPlain tptIdent hi link tptNumber Number " Possible errors hi link tptNotEmptyLine Error hi link tptElseIfError Error let b:current_syntax = "libtpt" " vim: ts=8