| @@ -0,0 +1,92 @@ |
| 1 | +" Vim syntax file |
| 2 | +" Language: Limbo |
| 3 | +" Maintainer: Alex Efros <powerman-asdf@ya.ru> |
| 4 | +" Version: 0.5 |
| 5 | +" Updated: 2008-10-17 |
| 6 | + |
| 7 | +" Remove any old syntax stuff that was loaded (5.x) or quit when a syntax file |
| 8 | +" was already loaded (6.x). |
| 9 | +if version < 600 |
| 10 | + syntax clear |
| 11 | +elseif exists("b:current_syntax") |
| 12 | + finish |
| 13 | +endif |
| 14 | + |
| 15 | +syn keyword lTodo TODO TBD FIXME XXX BUG contained |
| 16 | +syn match lComment "#.*" contains=@Spell,lTodo |
| 17 | + |
| 18 | +syn keyword lInclude include |
| 19 | + |
| 20 | +syn match lSpecialChar display contained "\\\(u\x\{4}\|['\"\\tnrbavf0]\)" |
| 21 | +syn match lSpecialError display contained "\(\\[^'\"\\tnrbavf0u]\+\|\\u.\{0,3}\X\)" |
| 22 | +syn match lCharError display contained "\([^\\'][^']\+\|\\[^'][^']\+\)" |
| 23 | +syn region lString start=+"+ end=+"+ skip=+\\"+ contains=@Spell,lSpecialChar,lSpecialError |
| 24 | +syn region lCharacter start=+'+ end=+'+ skip=+\\'+ contains=lSpecialChar,lSpecialError,lCharError |
| 25 | + |
| 26 | +syn keyword lSpecial nil iota |
| 27 | + |
| 28 | +syn keyword lFunction tl hd len tagof |
| 29 | +syn match lFunction "<-=\?" |
| 30 | + |
| 31 | +syn keyword lStatement alt break continue exit return spawn implement import load raise |
| 32 | +syn keyword lRepeat for while do |
| 33 | +syn keyword lConditional if else case |
| 34 | + |
| 35 | +syn keyword lType array big byte chan con int list real string fn fixed |
| 36 | +syn keyword lStructure adt pick module |
| 37 | +syn keyword lStorageClass ref self cyclic type of |
| 38 | + |
| 39 | +syn keyword lDelimiter or to |
| 40 | +syn match lDelimiter "=>\|->\|\.\|::" |
| 41 | + |
| 42 | + |
| 43 | +if version >= 508 || !exists("did_icgiperl_syn_inits") |
| 44 | + if version < 508 |
| 45 | + let did_icgiperl_syn_inits = 1 |
| 46 | + command -nargs=+ HiLink hi link <args> |
| 47 | + else |
| 48 | + command -nargs=+ HiLink hi def link <args> |
| 49 | + endif |
| 50 | + |
| 51 | + " Comment |
| 52 | + HiLink lComment Comment |
| 53 | + |
| 54 | + " PreProc (Include, PreCondit) |
| 55 | + HiLink lInclude Include |
| 56 | + |
| 57 | + " Constant (String, Character, Number, Boolean, Float) |
| 58 | + HiLink lString String |
| 59 | + HiLink lCharacter Character |
| 60 | + |
| 61 | + " Special (Tag, SpecialChar, SpecialComment, Debug) |
| 62 | + HiLink lSpecial Special |
| 63 | + HiLink lSpecialChar SpecialChar |
| 64 | + |
| 65 | + " Identifier (Function) |
| 66 | + HiLink lFunction Function |
| 67 | + |
| 68 | + " Statement (Conditional, Repeat, Label, Operator, Keyword, Exception) |
| 69 | + HiLink lStatement Statement |
| 70 | + HiLink lRepeat Repeat |
| 71 | + HiLink lConditional Conditional |
| 72 | + |
| 73 | + " Type (StorageClass, Structure, Typedef) |
| 74 | + HiLink lType Type |
| 75 | + HiLink lStructure Structure |
| 76 | + HiLink lStorageClass StorageClass |
| 77 | + |
| 78 | + " Error |
| 79 | + HiLink lSpecialError Error |
| 80 | + HiLink lCharError Error |
| 81 | + |
| 82 | + " Todo |
| 83 | + HiLink lTodo Todo |
| 84 | + |
| 85 | + " Delimiter |
| 86 | + HiLink lDelimiter Delimiter |
| 87 | + |
| 88 | + delcommand HiLink |
| 89 | +endif |
| 90 | + |
| 91 | + |
| 92 | +let b:current_syntax = "limbo" |