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