annotate runtime/syntax/sml.vim @ 30023:87063bfe81cd v9.0.0349

patch 9.0.0349: filetype of *.sil files not well detected Commit: https://github.com/vim/vim/commit/be807d582499acbe314ead3891481cba6ca136df Author: Bram Moolenaar <Bram@vim.org> Date: Thu Sep 1 15:01:25 2022 +0100 patch 9.0.0349: filetype of *.sil files not well detected Problem: Filetype of *.sil files not well detected. Solution: Inspect the file contents to guess the filetype.
author Bram Moolenaar <Bram@vim.org>
date Thu, 01 Sep 2022 16:15:03 +0200
parents 6dd88e45d47d
children
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
28379
6dd88e45d47d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25880
diff changeset
4 " Maintainer: Markus Mottl <markus.mottl@gmail.com>
6dd88e45d47d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25880
diff changeset
5 " Previous Maintainer: Fabrizio Zeno Cornelli
6dd88e45d47d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25880
diff changeset
6 " <zeno@filibusta.crema.unimi.it> (invalid)
6dd88e45d47d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25880
diff changeset
7 " Last Change: 2022 Apr 01
23466
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
8 " 2015 Aug 31 - Fixed opening of modules (Ramana Kumar)
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
9 " 2006 Oct 23 - Fixed character highlighting bug (MM)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 1120
diff changeset
11 " quit when a syntax file was already loaded
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 1120
diff changeset
12 if exists("b:current_syntax")
25880
9c221ad9634a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23466
diff changeset
13 finish
9c221ad9634a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23466
diff changeset
14 endif
23466
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
15
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
16 " Disable spell checking of syntax.
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
17 syn spell notoplevel
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
18
7
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
23466
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
58 syn region smlComment start="(\*" end="\*)" contains=smlComment,smlTodo,@Spell
7
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"
23466
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
88 syn region smlNone matchgroup=smlKeyword start="\<open\>" matchgroup=smlModule end="\<\w\(\w\|'\)*\(\.\w\(\w\|'\)*\)*\>" contains=@smlAllErrs,smlComment
7
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"+
23466
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
142 syn region smlString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell
7
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
23466
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
155 syn match smlNumber "\<-\=\d\+\>"
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
156 syn match smlNumber "\<-\=0[x|X]\x\+\>"
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
157 syn match smlReal "\<-\=\d\+\.\d*\([eE][-+]\=\d\+\)\=[fl]\=\>"
7
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.
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 1120
diff changeset
171 " Only when an item doesn't have highlighting yet
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 1120
diff changeset
172
23466
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
173 hi def link smlBraceErr Error
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
174 hi def link smlBrackErr Error
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
175 hi def link smlParenErr Error
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
176
23466
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
177 hi def link smlCommentErr Error
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
178
23466
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
179 hi def link smlEndErr Error
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
180 hi def link smlThenErr Error
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181
23466
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
182 hi def link smlCharErr Error
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183
23466
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
184 hi def link smlComment Comment
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185
23466
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
186 hi def link smlModPath Include
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
187 hi def link smlModule Include
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
188 hi def link smlModParam1 Include
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
189 hi def link smlModType Include
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
190 hi def link smlMPRestr3 Include
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
191 hi def link smlFullMod Include
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
192 hi def link smlModTypeRestr Include
23466
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
193 hi def link smlWith Include
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
194 hi def link smlMTDef Include
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
195
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
196 hi def link smlConstructor Constant
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
197
23466
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
198 hi def link smlModPreRHS Keyword
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
199 hi def link smlMPRestr2 Keyword
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
200 hi def link smlKeyword Keyword
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
201 hi def link smlFunDef Keyword
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
202 hi def link smlRefAssign Keyword
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
203 hi def link smlKeyChar Keyword
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
204 hi def link smlAnyVar Keyword
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
205 hi def link smlTopStop Keyword
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
206 hi def link smlOperator Keyword
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
207
23466
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
208 hi def link smlBoolean Boolean
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
209 hi def link smlCharacter Character
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
210 hi def link smlNumber Number
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
211 hi def link smlReal Float
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
212 hi def link smlString String
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
213 hi def link smlType Type
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
214 hi def link smlTodo Todo
15fa3923cc49 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
215 hi def link smlEncl Keyword
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
216
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
217
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
218 let b:current_syntax = "sml"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
219
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
220 " vim: ts=8