@@ -18,21 +18,22 @@ syn keyword purescriptBoolean true false
1818" Delimiters
1919syn match purescriptDelimiter " [,;|.()[\] {}]"
2020
21- " Constructor
22- syn match purescriptConstructor " \% (\< class\s\+\)\@ 15<!\< [A-Z]\w *\> "
23- syn region purescriptConstructorDecl matchgroup =purescriptConstructor start =" \< [A-Z]\w *\> " end =" \( |\| $\) " me =e - 1 ,re =e - 1 contained
24- \ containedin= purescriptData,purescriptNewtype
25- \ contains= purescriptType,purescriptTypeVar,purescriptDelimiter,purescriptOperatorType,purescriptOperatorTypeSig,@p urescriptComment
26-
2721" Type
28- syn match purescriptType " \% (\< class\s\+\)\@ 15<!\< [A-Z] \w *\> " contained
22+ syn match purescriptType " \% (\< class\s\+\)\@ 15<!\<\u \w *\> " contained
2923 \ containedin= purescriptTypeAlias
3024 \ nextgroup= purescriptType,purescriptTypeVar skipwhite
3125syn match purescriptTypeVar " \< [_a-z]\(\w\|\'\) *\> " contained
3226 \ containedin= purescriptData,purescriptNewtype,purescriptTypeAlias,purescriptFunctionDecl
3327syn region purescriptTypeExport matchgroup =purescriptType start =" \< [A-Z]\(\S\& [^,.]\) *\> (" rs =e - 1 matchgroup =purescriptDelimiter end =" )" contained extend
3428 \ contains= purescriptConstructor,purescriptDelimiter
3529
30+ " Constructor
31+ syn match purescriptConstructor " \% (\< class\s\+\)\@ 15<!\<\u\w *\> "
32+ syn region purescriptConstructorDecl matchgroup =purescriptConstructor start =" \< [A-Z]\w *\> " end =" \( |\| $\) " me =e - 1 ,re =e - 1 contained
33+ \ containedin= purescriptData,purescriptNewtype
34+ \ contains= purescriptType,purescriptTypeVar,purescriptDelimiter,purescriptOperatorType,purescriptOperatorTypeSig,@p urescriptComment
35+
36+
3637" Function
3738syn match purescriptFunction " \% (\< instance\s\+\|\< class\s\+\)\@ 18<!\< [_a-z]\(\w\|\'\) *\> " contained
3839" syn match purescriptFunction "\<[_a-z]\(\w\|\'\)*\>" contained
@@ -73,12 +74,13 @@ syn region purescriptImportParams
7374 \ skip = " ([^)]\{ -})"
7475 \ end = " )"
7576 \ contained
76- \ contains= purescriptClass,purescriptClassName ,purescriptStructure,purescriptType
77+ \ contains= purescriptClass,purescriptClass ,purescriptStructure,purescriptType,purescriptIdentifier
7778 \ nextgroup= purescriptImportAs
7879 \ skipwhite
7980syn keyword purescriptAsKeyword as contained
8081syn match purescriptImportAs " \< as\>\_ s\+\u\w *"
8182 \ contains= purescriptAsKeyword,purescriptModuleName
83+ \ nextgroup= purescriptModuleName
8284syn keyword purescriptHidingKeyword hiding contained
8385syn match purescriptImportHiding " hiding"
8486 \ contained
@@ -165,6 +167,7 @@ syn sync minlines=50
165167highlight def link purescriptModule Include
166168highlight def link purescriptImport Include
167169highlight def link purescriptModuleKeyword purescriptKeyword
170+ highlight def link purescriptImportAs Include
168171highlight def link purescriptModuleName Include
169172highlight def link purescriptModuleParams purescriptDelimiter
170173highlight def link purescriptImportKeyword purescriptKeyword
0 commit comments