]> git.r.bdr.sh - rbdr/api-notation.vim/blame - syntax/api-notation.vim
Adds dataType support to module names
[rbdr/api-notation.vim] / syntax / api-notation.vim
CommitLineData
ff11ecc1
BB
1" Vim syntax file
2" Language: API Notation
3" Maintainer: Rubén Beltrán del Río
4" Latest Revision: 22 June 2015
5
6if exists("b:current_syntax")
7 finish
8endif
9
76926b3d 10syn match moduleName '^[a-zA-Z0-9_.]\+\s*' nextgroup=dataType
ff11ecc1
BB
11
12syn match classMembers '^\s\+\(\(<+\)\|\(<\~\)\|\(<-\)\|\(+>\)\|\(\~>\)\|\(->\)\|-\|+\|\(::\)\|#\)' nextgroup=memberName skipwhite
13syn match internalOperators '\(\(<+\)\|\(<\~\)\|\(<-\)\|\(+>\)\|\(\~>\)\|\(->\)\|-\|+\|\(::\)\|#\)' contained nextgroup=memberName skipwhite
14syn match returnIdentifiers '\(=>\)' nextgroup=returnValue
15syn match returnIdentifiers '\(->\)'
16
17syn match memberName '\w\+' contained nextgroup=internalOperators,spacedDataType
18
19syn region parameterList start="(" end=")" transparent contains=parameters,separators,optionalParameter,dataType
20syn region optionalParameter start="\[" end="]" contains=optionalParameters contained
21syn region dataType start="<" end=">" contains=dataTypes,separators contained
22syn region spacedDataType start='\s\+<' end=">" contains=dataTypes,separators contained
23
24syn match optionalParameters '\w\+' contained
25syn match parameters '\w\+' contained
26syn match dataTypes '\w\+' contained
27syn match separators '|\|,' contained
28
29syn match returnValue '.*' contained contains=dataType,parameters
30
31
32hi def link moduleName Identifier
33
34hi def link classMembers Operator
35hi def link returnIdentifiers Operator
36hi def link internalOperators Operator
37
38hi def link memberName Special
39
40hi def link parameters PreProc
41hi def link optionalParameters Underlined
42hi def link dataTypes Constant
43
44hi def link separators Comment