Merge branch 'vim-with-runtime' into feat/quickfix-title
[vim_extended.git] / runtime / syntax / kscript.vim
blobcefbe39a29e86e69727fe48d575484c4d0d19790
1 " Vim syntax file
2 " Language:     kscript
3 " Maintainer:   Thomas Capricelli <orzel@yalbi.com>
4 " URL:          http://aquila.rezel.enst.fr/thomas/vim/kscript.vim
5 " CVS:          $Id: kscript.vim,v 1.1 2004/06/13 17:40:02 vimboss Exp $
7 " For version 5.x: Clear all syntax items
8 " For version 6.x: Quit when a syntax file was already loaded
9 if version < 600
10   syntax clear
11 elseif exists("b:current_syntax")
12   finish
13 endif
15 syn keyword     kscriptPreCondit        import from
17 syn keyword     kscriptHardCoded        print println connect length arg mid upper lower isEmpty toInt toFloat findApplication
18 syn keyword     kscriptConditional      if else switch
19 syn keyword     kscriptRepeat           while for do foreach
20 syn keyword     kscriptExceptions       emit catch raise try signal
21 syn keyword     kscriptFunction         class struct enum
22 syn keyword     kscriptConst            FALSE TRUE false true
23 syn keyword     kscriptStatement        return delete
24 syn keyword     kscriptLabel            case default
25 syn keyword     kscriptStorageClass     const
26 syn keyword     kscriptType             in out inout var
28 syn keyword     kscriptTodo             contained TODO FIXME XXX
30 syn region      kscriptComment          start="/\*" end="\*/" contains=kscriptTodo
31 syn match       kscriptComment          "//.*" contains=kscriptTodo
32 syn match       kscriptComment          "#.*$" contains=kscriptTodo
34 syn region      kscriptString           start=+'+  end=+'+ skip=+\\\\\|\\'+
35 syn region      kscriptString           start=+"+  end=+"+ skip=+\\\\\|\\"+
36 syn region      kscriptString           start=+"""+  end=+"""+
37 syn region      kscriptString           start=+'''+  end=+'''+
39 " Define the default highlighting.
40 " For version 5.7 and earlier: only when not done already
41 " For version 5.8 and later: only when an item doesn't have highlighting yet
42 if version >= 508 || !exists("did_kscript_syntax_inits")
43   if version < 508
44     let did_kscript_syntax_inits = 1
45     command -nargs=+ HiLink hi link <args>
46   else
47     command -nargs=+ HiLink hi def link <args>
48   endif
50   HiLink kscriptConditional             Conditional
51   HiLink kscriptRepeat                  Repeat
52   HiLink kscriptExceptions              Statement
53   HiLink kscriptFunction                Function
54   HiLink kscriptConst                   Constant
55   HiLink kscriptStatement               Statement
56   HiLink kscriptLabel                   Label
57   HiLink kscriptStorageClass            StorageClass
58   HiLink kscriptType                    Type
59   HiLink kscriptTodo                    Todo
60   HiLink kscriptComment         Comment
61   HiLink kscriptString                  String
62   HiLink kscriptPreCondit               PreCondit
63   HiLink kscriptHardCoded               Statement
65   delcommand HiLink
66 endif
68 let b:current_syntax = "kscript"
70 " vim: ts=8