codekingpro/portable-devtools
114k
1" Vim syntax file2" Language: Icon3" Maintainer: Doug Kearns <dougkearns@gmail.com>4" Previous Maintainer: Wendell Turner <wendell@adsi-m4.com> (invalid last known address)5" Last Change: 2022 Jun 166" Contributor: eschen@alumni.princeton.edu 2002.09.187 8" Prelude {{{19if exists("b:current_syntax")10 finish11endif12 13syn iskeyword @,48-57,_,192-255,&14 15" Not Top {{{116syn cluster iconNotTop contains=iconDocField,iconIncluded,iconStringSpecial,iconTodo,@Spell17 18" Whitespace errors {{{119if exists("icon_space_errors")20 if !exists("icon_no_trail_space_error")21 syn match iconSpaceError "\s\+$" display excludenl22 endif23 if !exists("icon_no_tab_space_error")24 syn match iconSpaceError " \+\t"me=e-1 display25 endif26endif27 28" Reserved words {{{129syn keyword iconReserved break by case create default do else every fail if30syn keyword iconReserved initial next not of repeat return suspend then to31syn keyword iconReserved until while32 33syn keyword iconStorageClass global static local record invocable34 35syn keyword iconLink link36 37" Procedure definitions {{{138if exists("icon_no_procedure_fold")39 syn region iconProcedure matchgroup=iconReserved start="\<procedure\>" end="\<end\>" contains=ALLBUT,@iconNotTop40else41 syn region iconProcedure matchgroup=iconReserved start="\<procedure\>" end="\<end\>" contains=ALLBUT,@iconNotTop fold42endif43 44" Keywords {{{145syn keyword iconKeyword &allocated &ascii &clock &collections &cset ¤t46syn keyword iconKeyword &date &dateline &digits &dump &e &error &errornumber47syn keyword iconKeyword &errortext &errorvalue &errout &fail &features &file48syn keyword iconKeyword &host &input &lcase &letters &level &line &main &null49syn keyword iconKeyword &output &phi &pi &pos &progname &random ®ions50syn keyword iconKeyword &source &storage &subject &time &trace &ucase &version51 52" Graphics keywords53syn keyword iconKeyword &col &control &interval &ldrag &lpress &lrelease54syn keyword iconKeyword &mdrag &meta &mpress &mrelease &rdrag &resize &row55syn keyword iconKeyword &rpress &rrelease &shift &window &x &y56 57" Functions {{{158syn keyword iconFunction abs acos any args asin atan bal callout center char59syn keyword iconFunction chdir close collect copy cos cset delay delete detab60syn keyword iconFunction display dtor entab errorclear exit exp find flush61syn keyword iconFunction function get getch getche getenv iand icom image62syn keyword iconFunction insert integer ior ishift ixor kbhit key left list63syn keyword iconFunction loadfunc log many map match member move name numeric64syn keyword iconFunction open ord pop pos proc pull push put read reads real65syn keyword iconFunction remove rename repl reverse right rtod runerr save66syn keyword iconFunction seek self seq serial set sin sort sortf sqrt stop67syn keyword iconFunction string system tab table tan trim type upto variable68syn keyword iconFunction where write writes69 70" Graphics functions71syn keyword iconFunction Active Alert Bg CenterString Clip Clone Color72syn keyword iconFunction ColorDialog ColorValue CopyArea Couple DrawArc73syn keyword iconFunction DrawCircle DrawCurve DrawImage DrawLine DrawPoint74syn keyword iconFunction DrawPolygon DrawRectangle DrawSegment DrawString75syn keyword iconFunction Enqueue EraseArea Event Fg FillArc FillCircle76syn keyword iconFunction FillPolygon FillRectangle Font FreeColor GotoRC77syn keyword iconFunction GotoXY LeftString Lower NewColor Notice OpenDialog78syn keyword iconFunction PaletteChars PaletteColor PaletteGrays PaletteKey79syn keyword iconFunction Pattern Pending Pixel Raise ReadImage RightString80syn keyword iconFunction SaveDialog SelectDialog Shade TextDialog TextWidth81syn keyword iconFunction ToggleDialog Uncouple WAttrib WClose WDefault WDelay82syn keyword iconFunction WDone WFlush WOpen WQuit WRead WReads WriteImage83syn keyword iconFunction WSync WWrite WWrites84 85" String and character constants {{{186syn match iconStringSpecial "\\x\x\{2}\|\\\o\{3\}\|\\[bdeflnrtv\"\'\\]\|\\^[a-zA-Z0-9]" contained 87syn match iconStringSpecial "\\$" contained88syn match iconStringSpecial "_\ze\s*$" contained89 90syn region iconString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=iconStringSpecial91syn region iconCset start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=iconStringSpecial92 93" Bracket errors {{{194 95if !exists("icon_no_bracket_errors")96 " catch errors caused by wrong brackets (ACE 2002.09.18)97 syn cluster iconBracketGroup contains=iconBracketError,iconIncluded98 syn region iconBracket start='\[' end='\]' contains=ALLBUT,@iconBracketGroup,@iconNotTop transparent 99 syn match iconBracketError "]"100 101 "catch errors caused by wrong braces (ACE 2002.09.18)102 syn cluster iconBraceGroup contains=iconBraceError,iconIncluded103 syn region iconBrace start='{' end='}' contains=ALLBUT,@iconBraceGroup,@iconNotTop transparent 104 syn match iconBraceError "}"105 106 "catch errors caused by wrong parenthesis107 syn cluster iconParenGroup contains=iconParenError,iconIncluded108 syn region iconParen start='(' end=')' contains=ALLBUT,@iconParenGroup,@iconNotTop transparent 109 syn match iconParenError ")"110end111 112" Numbers {{{1113syn case ignore114 115" integer116syn match iconInteger "\<\d\+\>"117syn match iconInteger "\<\d\{1,2}[rR][a-zA-Z0-9]\+\>"118 119" real with trailing dot120syn match iconReal "\<\d\+\."121 122" real, with dot, optional exponent123syn match iconReal "\<\d\+\.\d*\%(e[-+]\=\d\+\)\=\>"124 125" real, with leading dot, optional exponent126syn match iconReal "\.\d\+\%(e[-+]\=\d\+\)\=\>"127 128" real, without dot, with exponent129syn match iconReal "\<\d\+e[-+]\=\d\+\>"130 131syn cluster iconNumber contains=iconInteger,iconReal132 133syn case match134 135" Comments {{{1136syn keyword iconTodo TODO FIXME XXX BUG contained137syn match iconComment "#.*" contains=iconTodo,iconSpaceError,@Spell138syn match iconDocField "^#\s\+\zs\%(File\|Subject\|Authors\=\|Date\|Version\|Links\|Requires\|See also\):" contained139 140if exists("icon_no_comment_fold")141 syn region iconDocumentation start="\%^#\{2,}\%(\n#\+\%(\s\+.*\)\=\)\+" end="^#\+\n\s*$" contains=iconDocField keepend142else143 syn region iconMultilineComment start="^\s*#.*\n\%(^\s*#\)\@=" end="^\s*#.*\n\%(^\s*#\)\@!" contains=iconComment keepend fold transparent 144 syn region iconDocumentation start="\%^#\{2,}\%(\n#\)\+" end="^#\+\n\%([^#]\|$\)" contains=iconDocField keepend fold145endif146 147" Preprocessor {{{1148syn match iconPreInclude '^\s*\zs$\s*include\>\ze\s*"' nextgroup=iconIncluded skipwhite149syn match iconIncluded '"[^"]\+"' contained150 151syn region iconPreDefine start="^\s*\zs$\s*\%(define\|undef\)\>" end="$" oneline contains=ALLBUT,@iconPreGroup152syn region iconPreProc start="^\s*\zs$\s*\%(error\|line\)\>" end="$" oneline contains=ALLBUT,@iconPreGroup153syn region iconPreConditional start="^\s*\zs$\s*\%(if\|ifdef\|ifndef\|elif\|else\|endif\)\>" end="$" oneline contains=iconComment,iconString,iconCset,iconNumber,iconSpaceError154 155syn cluster iconPreGroup contains=iconPreCondit,iconPreInclude,iconIncluded,iconPreDefine156 157syn match iconPreSymbol "_V\d\+"158syn keyword iconPreSymbol _ACORN _AMIGA _ARM_FUNCTIONS _ASCII _CALLING159syn keyword iconPreSymbol _CO_EXPRESSIONS _COMPILED _DIRECT_EXECUTION160syn keyword iconPreSymbol _DOS_FUNCTIONS _EBCDIC _EVENT_MONITOR161syn keyword iconPreSymbol _EXECUTABLE_IMAGES _EXTERNAL_FUNCTIONS162syn keyword iconPreSymbol _EXTERNAL_VALUES _INTERPRETED _KEYBOARD_FUNCTIONS163syn keyword iconPreSymbol _LARGE_INTEGERS _MACINTOSH _MEMORY_MONITOR _MSDOS164syn keyword iconPreSymbol _MSDOS_386 _MULTIREGION _MULTITASKING _OS2 _PIPES165syn keyword iconPreSymbol _PORT _PRESENTATION_MGR _RECORD_IO _STRING_INVOKE166syn keyword iconPreSymbol _SYSTEM_FUNCTION _UNIX _VISUALIZATION _VMS167syn keyword iconPreSymbol _WINDOW_FUNCTIONS _X_WINDOW_SYSTEM 168 169" Syncing {{{1170if !exists("icon_minlines")171 let icon_minlines = 250172endif173exec "syn sync ccomment iconComment minlines=" . icon_minlines174 175" Default Highlighting {{{1176 177hi def link iconParenError iconError178hi def link iconBracketError iconError179hi def link iconBraceError iconError180hi def link iconSpaceError iconError181hi def link iconError Error182 183hi def link iconInteger Number184hi def link iconReal Float185hi def link iconString String186hi def link iconCset String187hi def link iconStringSpecial SpecialChar188 189hi def link iconPreProc PreProc190hi def link iconIncluded iconString191hi def link iconPreInclude Include192hi def link iconPreSymbol iconPreProc193hi def link iconPreDefine Define194hi def link iconPreConditional PreCondit195 196hi def link iconStatement Statement197hi def link iconStorageClass StorageClass198hi def link iconFunction Function199hi def link iconReserved Label200hi def link iconLink Include201hi def link iconKeyword Keyword202 203hi def link iconComment Comment204hi def link iconTodo Todo205hi def link iconDocField SpecialComment206hi def link iconDocumentation Comment207 208" Postscript {{{1209let b:current_syntax = "icon"210 211" vim: nowrap sw=2 sts=2 ts=8 noet fdm=marker:212 