@@ -37,6 +37,8 @@ setlocal iskeyword+=`
37
37
" OCaml is case sensitive.
38
38
syn case match
39
39
40
+ syn match ocamlWhite / [ \t\n\r ]*/
41
+
40
42
" Access to the method of an object
41
43
syn match ocamlMethod " #"
42
44
@@ -481,8 +483,8 @@ hi link ocamlTypeDefImpl ocamlTypeCatchAll
481
483
" ocamlTypeDefImpl.
482
484
syn region ocamlTypeDef
483
485
\ matchgroup= ocamlKeyword start = " \< type\>\(\_ s\+\< nonrec\>\)\?\|\< constraint\> "
484
- \ matchgroup= ocamlLCIdentifier end = " \<\l\(\w\| '\) *\> "
485
- \ contains= @o camlAllErrs,ocamlComment,ocamlTypeVariance,ocamlTypeVar
486
+ \ matchgroup= ocamlTypeIdentifier end = " \<\l\(\w\| '\) *\> "
487
+ \ contains= @o camlAllErrs,ocamlComment,ocamlTypeVariance,ocamlTypeVar,ocamlWhite
486
488
\ skipwhite skipempty
487
489
\ nextgroup= ocamlTypeDefImpl,ocamlTypeDefAnd
488
490
@@ -492,8 +494,8 @@ syn region ocamlTypeDef
492
494
" ocamlTypeDefImpl.
493
495
syn region ocamlTypeDefAnd
494
496
\ matchgroup= ocamlKeyword start = " \< and\> "
495
- \ matchgroup= ocamlLCIdentifier end = " \<\l\(\w\| '\) *\> "
496
- \ contains= @o camlAllErrs,ocamlComment,ocamlTypeVariance,ocamlTypeVar
497
+ \ matchgroup= ocamlTypeIdentifier end = " \<\l\(\w\| '\) *\> "
498
+ \ contains= @o camlAllErrs,ocamlComment,ocamlTypeVariance,ocamlTypeVar,ocamlWhite
497
499
\ skipwhite skipempty
498
500
\ nextgroup= ocamlTypeDefImpl,ocamlTypeDefAnd
499
501
@@ -505,6 +507,7 @@ syn region ocamlExceptionDef
505
507
\ skipwhite skipempty
506
508
\ nextgroup= ocamlTypeDefImpl
507
509
510
+ hi link ocamlTypeIdentifier ocamlLCIdentifier
508
511
syn cluster ocamlTypeContained add =ocamlTypePrivate
509
512
syn keyword ocamlTypePrivate contained private
510
513
hi link ocamlTypePrivate ocamlKeyword
0 commit comments