@@ -77,7 +77,7 @@ syn match ocamlKwErr "\<\(mutable\|nonrec\|of\|private\)\>"
7777syn cluster ocamlAllErrs contains =@ocamlAENoParen,ocamlParenErr
7878syn cluster ocamlAENoParen contains =ocamlBraceErr,ocamlBrackErr,ocamlCountErr,ocamlDoErr,ocamlDoneErr,ocamlEndErr,ocamlThenErr,ocamlKwErr
7979
80- syn cluster ocamlContained contains =ocamlTodo,ocamlPreDef,ocamlModParam,ocamlModParam1,ocamlMPRestr ,ocamlModRHS,ocamlFuncWith,ocamlModTypeRestr,ocamlModTRWith,ocamlWith,ocamlWithRest,ocamlModType ,ocamlFullMod,ocamlVal
80+ syn cluster ocamlContained contains =ocamlTodo,ocamlPreDef,ocamlModParam,ocamlModParam1,ocamlModTypePre ,ocamlModRHS,ocamlFuncWith,ocamlModTypeRestr,ocamlModTRWith,ocamlWith,ocamlWithRest,ocamlFullMod,ocamlVal
8181
8282
8383" Enclosing delimiters
@@ -129,16 +129,17 @@ syn match ocamlKeyword "\<include\>" skipwhite skipempty nextgroup=ocamlModPa
129129
130130" "module" - somewhat complicated stuff ;-)
131131syn region ocamlModule matchgroup =ocamlKeyword start =" \< module\> " matchgroup =ocamlModule end =" \<\u\(\w\| '\) *\> " contains =@ocamlAllErrs,ocamlComment skipwhite skipempty nextgroup =ocamlPreDef
132- syn region ocamlPreDef start =" ." me =e - 1 end =" [a-z:=)]\@ =" contained contains =@ocamlAllErrs,ocamlComment,ocamlModParam,ocamlGenMod,ocamlModTypeRestr nextgroup =ocamlMPRestr ,ocamlModPreRHS
132+ syn region ocamlPreDef start =" ." me =e - 1 end =" [a-z:=)]\@ =" contained contains =@ocamlAllErrs,ocamlComment,ocamlModParam,ocamlGenMod,ocamlModTypeRestr nextgroup =ocamlModTypePre ,ocamlModPreRHS
133133syn region ocamlModParam start =" (\*\@ !" end =" )" contained contains =ocamlGenMod,ocamlModParam,ocamlModParam1,ocamlSig,ocamlVal
134134syn match ocamlModParam1 " \<\u\(\w\| '\) *\> " contained skipwhite skipempty
135135syn match ocamlGenMod " ()" contained skipwhite skipempty
136136
137- syn match ocamlMPRestr " :" contained skipwhite skipempty nextgroup =ocamlModTRWith,ocamlSig,ocamlMPRestr2 ,ocamlModTypeRestr,ocamlModTypeOf
137+ syn match ocamlModTypePre " :" contained skipwhite skipempty nextgroup =ocamlModTRWith,ocamlSig,ocamlFunctor ,ocamlModTypeRestr,ocamlModTypeOf
138138syn match ocamlModTypeRestr " \<\w\(\w\| '\) *\( *\. *\w\(\w\| '\) *\) *\> " contained
139+
139140syn match ocamlModPreRHS " =" contained skipwhite skipempty nextgroup =ocamlModParam,ocamlFullMod
140141syn keyword ocamlKeyword val
141- syn region ocamlVal matchgroup =ocamlKeyword start =" \< val\> " matchgroup =ocamlLCIdentifier end =" \<\l\(\w\| '\) *\> " contains =@ocamlAllErrs,ocamlComment,ocamlFullMod skipwhite skipempty nextgroup =ocamlMPRestr
142+ syn region ocamlVal matchgroup =ocamlKeyword start =" \< val\> " matchgroup =ocamlLCIdentifier end =" \<\l\(\w\| '\) *\> " contains =@ocamlAllErrs,ocamlComment,ocamlFullMod skipwhite skipempty nextgroup =ocamlModTypePre
142143syn region ocamlModRHS start =" ." end =" . *\w\| ([^*]" me =e - 2 contained contains =ocamlComment skipwhite skipempty nextgroup =ocamlModParam,ocamlFullMod
143144syn match ocamlFullMod " \<\u\(\w\| '\) *\( *\. *\u\(\w\| '\) *\) *" contained skipwhite skipempty nextgroup =ocamlFuncWith
144145
@@ -155,7 +156,7 @@ syn region ocamlStruct matchgroup=ocamlStructEncl start="\<\(module\s\+\)\=str
155156syn region ocamlSig matchgroup =ocamlSigEncl start =" \< sig\> " matchgroup =ocamlSigEncl end =" \< end\> " contains =ALLBUT,@ocamlContained,ocamlEndErr
156157
157158" "functor"
158- syn region ocamlMPRestr2 start =" \< functor\> " matchgroup =ocamlKeyword end =" ->" contains =@ocamlAllErrs,ocamlComment,ocamlModParam,ocamlGenMod skipwhite skipempty nextgroup =ocamlStruct,ocamlSig,ocamlFuncWith,ocamlMPRestr2
159+ syn region ocamlFunctor start =" \< functor\> " matchgroup =ocamlKeyword end =" ->" contains =@ocamlAllErrs,ocamlComment,ocamlModParam,ocamlGenMod skipwhite skipempty nextgroup =ocamlStruct,ocamlSig,ocamlFuncWith,ocamlFunctor
159160
160161" "module type"
161162syn region ocamlModTypeOf start =" \< module\s\+ type\(\s\+ of\)\=\> " matchgroup =ocamlModule end =" \<\w\(\w\| '\) *\> " contains =ocamlComment skipwhite skipempty nextgroup =ocamlMTDef
@@ -582,7 +583,6 @@ hi def link ocamlObject Include
582583hi def link ocamlModule Include
583584hi def link ocamlModParam1 Include
584585hi def link ocamlGenMod Include
585- hi def link ocamlModType Include
586586hi def link ocamlFullMod Include
587587hi def link ocamlFuncWith Include
588588hi def link ocamlModParam Include
@@ -599,7 +599,7 @@ hi def link ocamlEmptyConstructor ocamlConstructor
599599
600600hi def link ocamlVal Keyword
601601hi def link ocamlModPreRHS Keyword
602- hi def link ocamlMPRestr2 Keyword
602+ hi def link ocamlFunctor Keyword
603603hi def link ocamlModTypeOf Keyword
604604hi def link ocamlKeyword Keyword
605605hi def link ocamlMethod Include
0 commit comments