]> git.r.bdr.sh - rbdr/api-notation.tmLanguage/blob - api-notation.YAML-tmLanguage
d7312523e0c47a1f0f41304a81a0814127cb6512
[rbdr/api-notation.tmLanguage] / api-notation.YAML-tmLanguage
1 # [PackageDev] target_format: plist, ext: tmLanguage
2 ---
3 name: API Notation
4 scopeName: source.api-notation
5 fileTypes: ['api']
6 uuid: fc8dc5cf-b7aa-4b64-a665-80e8dc1b2553
7 patterns:
8 - begin: '([a-zA-Z0-9_.]+)'
9 end: '\n'
10 name: constant.language
11 patterns:
12 - include: '#dataTypes'
13 - include: '#comment'
14 - begin: '^//.*'
15 end: '\n'
16 name: 'comment.line'
17 - begin: '[ \t]+'
18 end: '\n'
19 patterns:
20 - include: '#apiMember'
21 - include: '#parameterList'
22 - include: '#dataTypes'
23 - include: '#operators'
24 - include: '#parameters'
25 - include: '#comment'
26 - begin: '^.'
27 end: '\n'
28 patterns:
29 - include: '#comment'
30 repository:
31 dataTypes:
32 begin: '\<'
33 end: '\>'
34 name: 'keyword.operator'
35 patterns:
36 - include: '#dataType'
37 - include: '#separators'
38 parameterList:
39 begin: '\('
40 end: '\)'
41 name: 'keyword.operator'
42 patterns:
43 - 'include': '#parameters'
44 - 'include': '#optionalParameters'
45 - 'include': '#dataTypes'
46 - 'include': '#separators'
47 dataType:
48 match: '[a-zA-Z0-9_.]+'
49 name: 'support.function'
50 parameters:
51 match: '[a-zA-Z0-9_.]+'
52 name: 'string.other'
53 optionalParameters:
54 begin: '\['
55 end: '\]'
56 patterns:
57 - 'include': '#optionalParameter'
58 optionalParameter:
59 match: '[a-zA-Z0-9_.]+'
60 name: 'comment.line'
61 separators:
62 match: '\||,'
63 name: 'comment.line'
64 apiMember:
65 match: '((?:<\+)|(?:<\~)|(?:<\-)|(?:\+>)|(?:\~>)|(?:\->)|\-|\+|(?:::)|#)([a-zA-z0-9_]+)'
66 captures:
67 '1':
68 name: 'keyword.control'
69 '2':
70 name: 'variable.language'
71 comment:
72 match: '[ \t]*//[ \t]*.*'
73 name: 'comment.line'
74 operators:
75 match: '(?:\->)|(?:\=>)'
76 name: 'keyword.control'