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