]> git.r.bdr.sh - rbdr/api-notation.vim/blame_incremental - syntax/api-notation.vim
Updates readme to show comments and namespacing
[rbdr/api-notation.vim] / syntax / api-notation.vim
... / ...
CommitLineData
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
10syn match moduleName '^[a-zA-Z0-9_.]\+\s*' nextgroup=dataType
11
12syn match comment '\s*//\s*.*'
13
14syn match classMembers '^\s\+\(\(<+\)\|\(<\~\)\|\(<-\)\|\(+>\)\|\(\~>\)\|\(->\)\|-\|+\|\(::\)\|#\)' nextgroup=memberName skipwhite
15syn match internalOperators '\(\(<+\)\|\(<\~\)\|\(<-\)\|\(+>\)\|\(\~>\)\|\(->\)\|-\|+\|\(::\)\|#\)' contained nextgroup=memberName skipwhite
16syn match returnIdentifiers '\(=>\)' nextgroup=returnValue
17syn match returnIdentifiers '\(->\)'
18
19syn match memberName '\w\+' contained nextgroup=internalOperators,spacedDataType
20
21syn region parameterList start="(" end=")" transparent contains=parameters,separators,optionalParameter,dataType
22syn region optionalParameter start="\[" end="]" contains=optionalParameters contained
23syn region dataType start="<" end=">" contains=dataTypes,separators contained
24syn region spacedDataType start='\s\+<' end=">" contains=dataTypes,separators contained
25
26syn match optionalParameters '\w\+' contained
27syn match parameters '\w\+' contained
28syn match dataTypes '\w\+' contained
29syn match separators '|\|,' contained
30
31syn match returnValue '.*' contained contains=dataType,parameters
32
33
34hi def link moduleName Identifier
35
36hi def link classMembers Operator
37hi def link returnIdentifiers Operator
38hi def link internalOperators Operator
39
40hi def link memberName Special
41
42hi def link parameters PreProc
43hi def link optionalParameters Underlined
44hi def link dataTypes Constant
45
46hi def link separators Comment
47hi def link comment Comment