blob: e06b49d880dfd35dba9c86a367ebf6d84839dc53 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax file
2" Language: kscript
3" Maintainer: Thomas Capricelli <orzel@yalbi.com>
4" URL: http://aquila.rezel.enst.fr/thomas/vim/kscript.vim
Bram Moolenaar5c736222010-01-06 20:54:52 +01005" CVS: $Id: kscript.vim,v 1.1 2004/06/13 17:40:02 vimboss Exp $
Bram Moolenaar071d4272004-06-13 20:20:40 +00006
Bram Moolenaar89bcfda2016-08-30 23:26:57 +02007" quit when a syntax file was already loaded
8if exists("b:current_syntax")
Bram Moolenaar071d4272004-06-13 20:20:40 +00009 finish
10endif
11
12syn keyword kscriptPreCondit import from
13
14syn keyword kscriptHardCoded print println connect length arg mid upper lower isEmpty toInt toFloat findApplication
15syn keyword kscriptConditional if else switch
16syn keyword kscriptRepeat while for do foreach
17syn keyword kscriptExceptions emit catch raise try signal
18syn keyword kscriptFunction class struct enum
19syn keyword kscriptConst FALSE TRUE false true
20syn keyword kscriptStatement return delete
21syn keyword kscriptLabel case default
22syn keyword kscriptStorageClass const
23syn keyword kscriptType in out inout var
24
25syn keyword kscriptTodo contained TODO FIXME XXX
26
27syn region kscriptComment start="/\*" end="\*/" contains=kscriptTodo
28syn match kscriptComment "//.*" contains=kscriptTodo
29syn match kscriptComment "#.*$" contains=kscriptTodo
30
31syn region kscriptString start=+'+ end=+'+ skip=+\\\\\|\\'+
32syn region kscriptString start=+"+ end=+"+ skip=+\\\\\|\\"+
33syn region kscriptString start=+"""+ end=+"""+
34syn region kscriptString start=+'''+ end=+'''+
35
36" Define the default highlighting.
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020037" Only when an item doesn't have highlighting yet
38command -nargs=+ HiLink hi def link <args>
Bram Moolenaar071d4272004-06-13 20:20:40 +000039
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020040HiLink kscriptConditional Conditional
41HiLink kscriptRepeat Repeat
42HiLink kscriptExceptions Statement
43HiLink kscriptFunction Function
44HiLink kscriptConst Constant
45HiLink kscriptStatement Statement
46HiLink kscriptLabel Label
47HiLink kscriptStorageClass StorageClass
48HiLink kscriptType Type
49HiLink kscriptTodo Todo
50HiLink kscriptComment Comment
51HiLink kscriptString String
52HiLink kscriptPreCondit PreCondit
53HiLink kscriptHardCoded Statement
Bram Moolenaar071d4272004-06-13 20:20:40 +000054
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020055delcommand HiLink
Bram Moolenaar071d4272004-06-13 20:20:40 +000056
57let b:current_syntax = "kscript"
58
59" vim: ts=8