annotate runtime/syntax/sml.vim @ 2624:bfd69bfb4149 v7.3.046

updated for version 7.3.046 Problem: Can't build Ruby on MS-Windows. Solution: Add #ifdef, don't use WIN3264 before including vim.h.
author Bram Moolenaar <bram@vim.org>
date Wed, 27 Oct 2010 17:40:59 +0200
parents e6db096b07a1
children 43efa4f5a8ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: SML
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Filenames: *.sml *.sig
659
d6a69271cb9a updated for version 7.0194
vimboss
parents: 20
diff changeset
4 " Maintainers: Markus Mottl <markus.mottl@gmail.com>
20
4ac1dce8dd5e updated for version 7.0012
vimboss
parents: 7
diff changeset
5 " Fabrizio Zeno Cornelli <zeno@filibusta.crema.unimi.it>
659
d6a69271cb9a updated for version 7.0194
vimboss
parents: 20
diff changeset
6 " URL: http://www.ocaml.info/vim/syntax/sml.vim
1120
e6db096b07a1 updated for version 7.1a
vimboss
parents: 659
diff changeset
7 " Last Change: 2006 Oct 23 - Fixed character highlighting bug (MM)
e6db096b07a1 updated for version 7.1a
vimboss
parents: 659
diff changeset
8 " 2002 Jun 02 - Fixed small typo (MM)
20
4ac1dce8dd5e updated for version 7.0012
vimboss
parents: 7
diff changeset
9 " 2001 Nov 20 - Fixed small highlighting bug with modules (MM)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 " SML is case sensitive.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 " lowercase identifier - the standard way to match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn match smlLCIdentifier /\<\(\l\|_\)\(\w\|'\)*\>/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn match smlKeyChar "|"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 " Errors
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn match smlBraceErr "}"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn match smlBrackErr "\]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn match smlParenErr ")"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn match smlCommentErr "\*)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn match smlThenErr "\<then\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 " Error-highlighting of "end" without synchronization:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 " as keyword or as error (default)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 if exists("sml_noend_error")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn match smlKeyword "\<end\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn match smlEndErr "\<end\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 " Some convenient clusters
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn cluster smlAllErrs contains=smlBraceErr,smlBrackErr,smlParenErr,smlCommentErr,smlEndErr,smlThenErr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn cluster smlAENoParen contains=smlBraceErr,smlBrackErr,smlCommentErr,smlEndErr,smlThenErr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn cluster smlContained contains=smlTodo,smlPreDef,smlModParam,smlModParam1,smlPreMPRestr,smlMPRestr,smlMPRestr1,smlMPRestr2,smlMPRestr3,smlModRHS,smlFuncWith,smlFuncStruct,smlModTypeRestr,smlModTRWith,smlWith,smlWithRest,smlModType,smlFullMod
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 " Enclosing delimiters
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn region smlEncl transparent matchgroup=smlKeyword start="(" matchgroup=smlKeyword end=")" contains=ALLBUT,@smlContained,smlParenErr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn region smlEncl transparent matchgroup=smlKeyword start="{" matchgroup=smlKeyword end="}" contains=ALLBUT,@smlContained,smlBraceErr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn region smlEncl transparent matchgroup=smlKeyword start="\[" matchgroup=smlKeyword end="\]" contains=ALLBUT,@smlContained,smlBrackErr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn region smlEncl transparent matchgroup=smlKeyword start="#\[" matchgroup=smlKeyword end="\]" contains=ALLBUT,@smlContained,smlBrackErr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 " Comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn region smlComment start="(\*" end="\*)" contains=smlComment,smlTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn keyword smlTodo contained TODO FIXME XXX
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 " let
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn region smlEnd matchgroup=smlKeyword start="\<let\>" matchgroup=smlKeyword end="\<end\>" contains=ALLBUT,@smlContained,smlEndErr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 " local
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn region smlEnd matchgroup=smlKeyword start="\<local\>" matchgroup=smlKeyword end="\<end\>" contains=ALLBUT,@smlContained,smlEndErr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 " abstype
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn region smlNone matchgroup=smlKeyword start="\<abstype\>" matchgroup=smlKeyword end="\<end\>" contains=ALLBUT,@smlContained,smlEndErr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 " begin
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 syn region smlEnd matchgroup=smlKeyword start="\<begin\>" matchgroup=smlKeyword end="\<end\>" contains=ALLBUT,@smlContained,smlEndErr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 " if
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 syn region smlNone matchgroup=smlKeyword start="\<if\>" matchgroup=smlKeyword end="\<then\>" contains=ALLBUT,@smlContained,smlThenErr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 "" Modules
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 " "struct"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn region smlStruct matchgroup=smlModule start="\<struct\>" matchgroup=smlModule end="\<end\>" contains=ALLBUT,@smlContained,smlEndErr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 " "sig"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 syn region smlSig matchgroup=smlModule start="\<sig\>" matchgroup=smlModule end="\<end\>" contains=ALLBUT,@smlContained,smlEndErr,smlModule
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn region smlModSpec matchgroup=smlKeyword start="\<structure\>" matchgroup=smlModule end="\<\u\(\w\|'\)*\>" contained contains=@smlAllErrs,smlComment skipwhite skipempty nextgroup=smlModTRWith,smlMPRestr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 " "open"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 syn region smlNone matchgroup=smlKeyword start="\<open\>" matchgroup=smlModule end="\<\u\(\w\|'\)*\(\.\u\(\w\|'\)*\)*\>" contains=@smlAllErrs,smlComment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 " "structure" - somewhat complicated stuff ;-)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 syn region smlModule matchgroup=smlKeyword start="\<\(structure\|functor\)\>" matchgroup=smlModule end="\<\u\(\w\|'\)*\>" contains=@smlAllErrs,smlComment skipwhite skipempty nextgroup=smlPreDef
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 syn region smlPreDef start="."me=e-1 matchgroup=smlKeyword end="\l\|="me=e-1 contained contains=@smlAllErrs,smlComment,smlModParam,smlModTypeRestr,smlModTRWith nextgroup=smlModPreRHS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 syn region smlModParam start="([^*]" end=")" contained contains=@smlAENoParen,smlModParam1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 syn match smlModParam1 "\<\u\(\w\|'\)*\>" contained skipwhite skipempty nextgroup=smlPreMPRestr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 syn region smlPreMPRestr start="."me=e-1 end=")"me=e-1 contained contains=@smlAllErrs,smlComment,smlMPRestr,smlModTypeRestr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 syn region smlMPRestr start=":" end="."me=e-1 contained contains=@smlComment skipwhite skipempty nextgroup=smlMPRestr1,smlMPRestr2,smlMPRestr3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 syn region smlMPRestr1 matchgroup=smlModule start="\ssig\s\=" matchgroup=smlModule end="\<end\>" contained contains=ALLBUT,@smlContained,smlEndErr,smlModule
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 syn region smlMPRestr2 start="\sfunctor\(\s\|(\)\="me=e-1 matchgroup=smlKeyword end="->" contained contains=@smlAllErrs,smlComment,smlModParam skipwhite skipempty nextgroup=smlFuncWith
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 syn match smlMPRestr3 "\w\(\w\|'\)*\(\.\w\(\w\|'\)*\)*" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 syn match smlModPreRHS "=" contained skipwhite skipempty nextgroup=smlModParam,smlFullMod
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 syn region smlModRHS start="." end=".\w\|([^*]"me=e-2 contained contains=smlComment skipwhite skipempty nextgroup=smlModParam,smlFullMod
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 syn match smlFullMod "\<\u\(\w\|'\)*\(\.\u\(\w\|'\)*\)*" contained skipwhite skipempty nextgroup=smlFuncWith
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 syn region smlFuncWith start="([^*]"me=e-1 end=")" contained contains=smlComment,smlWith,smlFuncStruct
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 syn region smlFuncStruct matchgroup=smlModule start="[^a-zA-Z]struct\>"hs=s+1 matchgroup=smlModule end="\<end\>" contains=ALLBUT,@smlContained,smlEndErr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 syn match smlModTypeRestr "\<\w\(\w\|'\)*\(\.\w\(\w\|'\)*\)*\>" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 syn region smlModTRWith start=":\s*("hs=s+1 end=")" contained contains=@smlAENoParen,smlWith
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 syn match smlWith "\<\(\u\(\w\|'\)*\.\)*\w\(\w\|'\)*\>" contained skipwhite skipempty nextgroup=smlWithRest
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 syn region smlWithRest start="[^)]" end=")"me=e-1 contained contains=ALLBUT,@smlContained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 " "signature"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 syn region smlKeyword start="\<signature\>" matchgroup=smlModule end="\<\w\(\w\|'\)*\>" contains=smlComment skipwhite skipempty nextgroup=smlMTDef
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 syn match smlMTDef "=\s*\w\(\w\|'\)*\>"hs=s+1,me=s
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 syn keyword smlKeyword and andalso case
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 syn keyword smlKeyword datatype else eqtype
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 syn keyword smlKeyword exception fn fun handle
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 syn keyword smlKeyword in infix infixl infixr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 syn keyword smlKeyword match nonfix of orelse
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 syn keyword smlKeyword raise handle type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 syn keyword smlKeyword val where while with withtype
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 syn keyword smlType bool char exn int list option
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 syn keyword smlType real string unit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 syn keyword smlOperator div mod not or quot rem
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131 syn keyword smlBoolean true false
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 syn match smlConstructor "(\s*)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 syn match smlConstructor "\[\s*\]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 syn match smlConstructor "#\[\s*\]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 syn match smlConstructor "\u\(\w\|'\)*\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 " Module prefix
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 syn match smlModPath "\u\(\w\|'\)*\."he=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139
1120
e6db096b07a1 updated for version 7.1a
vimboss
parents: 659
diff changeset
140 syn match smlCharacter +#"\\""\|#"."\|#"\\\d\d\d"+
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 syn match smlCharErr +#"\\\d\d"\|#"\\\d"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 syn region smlString start=+"+ skip=+\\\\\|\\"+ end=+"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144 syn match smlFunDef "=>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 syn match smlRefAssign ":="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 syn match smlTopStop ";;"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147 syn match smlOperator "\^"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 syn match smlOperator "::"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149 syn match smlAnyVar "\<_\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150 syn match smlKeyChar "!"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151 syn match smlKeyChar ";"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 syn match smlKeyChar "\*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 syn match smlKeyChar "="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155 syn match smlNumber "\<-\=\d\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156 syn match smlNumber "\<-\=0[x|X]\x\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157 syn match smlReal "\<-\=\d\+\.\d*\([eE][-+]\=\d\+\)\=[fl]\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159 " Synchronization
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160 syn sync minlines=20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 syn sync maxlines=500
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163 syn sync match smlEndSync grouphere smlEnd "\<begin\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164 syn sync match smlEndSync groupthere smlEnd "\<end\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165 syn sync match smlStructSync grouphere smlStruct "\<struct\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166 syn sync match smlStructSync groupthere smlStruct "\<end\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167 syn sync match smlSigSync grouphere smlSig "\<sig\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168 syn sync match smlSigSync groupthere smlSig "\<end\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
171 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173 if version >= 508 || !exists("did_sml_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
174 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
175 let did_sml_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
176 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
177 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
178 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181 HiLink smlBraceErr Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182 HiLink smlBrackErr Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183 HiLink smlParenErr Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185 HiLink smlCommentErr Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
186
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
187 HiLink smlEndErr Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188 HiLink smlThenErr Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
189
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
190 HiLink smlCharErr Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
191
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
192 HiLink smlComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
193
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
194 HiLink smlModPath Include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
195 HiLink smlModule Include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
196 HiLink smlModParam1 Include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
197 HiLink smlModType Include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
198 HiLink smlMPRestr3 Include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
199 HiLink smlFullMod Include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
200 HiLink smlModTypeRestr Include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
201 HiLink smlWith Include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
202 HiLink smlMTDef Include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
203
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
204 HiLink smlConstructor Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
205
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
206 HiLink smlModPreRHS Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
207 HiLink smlMPRestr2 Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
208 HiLink smlKeyword Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
209 HiLink smlFunDef Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
210 HiLink smlRefAssign Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
211 HiLink smlKeyChar Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
212 HiLink smlAnyVar Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
213 HiLink smlTopStop Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
214 HiLink smlOperator Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
215
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
216 HiLink smlBoolean Boolean
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
217 HiLink smlCharacter Character
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
218 HiLink smlNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
219 HiLink smlReal Float
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
220 HiLink smlString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
221 HiLink smlType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
222 HiLink smlTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
223 HiLink smlEncl Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
224
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
225 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
226 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
227
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
228 let b:current_syntax = "sml"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
229
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
230 " vim: ts=8