]> git.r.bdr.sh - rbdr/api-notation.tmLanguage/blame - api-notation.YAML-tmLanguage
Merge branch 'master' of git.sr.ht:~rbdr/api-notation.tmLanguage
[rbdr/api-notation.tmLanguage] / api-notation.YAML-tmLanguage
CommitLineData
28681b37
BB
1# [PackageDev] target_format: plist, ext: tmLanguage
2---
3name: API Notation
4scopeName: source.api-notation
5fileTypes: ['api']
6uuid: fc8dc5cf-b7aa-4b64-a665-80e8dc1b2553
7patterns:
3421ec3d 8 - begin: '([a-zA-Z0-9_.]+)'
28681b37
BB
9 end: '\n'
10 name: constant.language
11 patterns:
12 - include: '#dataTypes'
13 - include: '#comment'
3421ec3d
BB
14 - begin: '^//.*'
15 end: '\n'
16 name: 'comment.line'
17 - begin: '[ \t]+'
28681b37
BB
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'
30repository:
31 dataTypes:
3421ec3d
BB
32 begin: '\<'
33 end: '\>'
28681b37
BB
34 name: 'keyword.operator'
35 patterns:
36 - include: '#dataType'
37 - include: '#separators'
38 parameterList:
3421ec3d
BB
39 begin: '\('
40 end: '\)'
28681b37
BB
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:
3421ec3d
BB
54 begin: '\['
55 end: '\]'
28681b37
BB
56 patterns:
57 - 'include': '#optionalParameter'
58 optionalParameter:
59 match: '[a-zA-Z0-9_.]+'
3421ec3d 60 name: 'comment.line'
28681b37 61 separators:
3421ec3d 62 match: '\||,'
28681b37
BB
63 name: 'comment.line'
64 apiMember:
3421ec3d 65 match: '((?:<\+)|(?:<\~)|(?:<\-)|(?:\+>)|(?:\~>)|(?:\->)|\-|\+|(?:::)|#)([a-zA-z0-9_]+)'
28681b37
BB
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:
3421ec3d 75 match: '(?:\->)|(?:\=>)'
28681b37 76 name: 'keyword.control'