-
Notifications
You must be signed in to change notification settings - Fork 2
/
Topas.YAML-tmLanguage
76 lines (63 loc) · 1.64 KB
/
Topas.YAML-tmLanguage
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# [PackageDev] target_format: plist, ext: tmLanguage
---
name: Topas
scopeName: text.topas
fileTypes: []
uuid: 65752c66-cd2c-4af4-8afd-c4803161a801
patterns:
# some lines are explicitly commented
- include: '#comment'
- name: meta.declaration.topas
match: ^\s*(?i:(includefile))\s*(=)\s*[\./\w]+
captures:
'1': {name: keyword.other.topas}
'2': {name: keyword.operator.topas}
# action lines are triggered by '=' character
# and last until a blank line or another action line is triggered
- name: meta.declaration.topas
begin: ^(?=.+=.+)
end: ^[(?=.*=)\s]
patterns:
- include: '#comment'
- include: '#keyword'
- include: '#data_type'
- include: '#parameter'
- include: '#boolean'
- include: '#string'
- include: '#numeric'
- include: '#operator'
# anything else is a comment
- name: comment.block.topas
match: .*
repository:
comment:
name: comment.line.topas
match: '#.*$'
keyword:
name: keyword.other.topas
match: (?i:inheritedvalue)
data_type:
name: meta.topas
match: '^([bidus]v?c?):'
captures:
'1': {name: storage.type.topas}
parameter:
name: variable.parameter.topas
match: '(?i:(ma|el|is|ge|gr|ph|so|sc|tf|ts|vr|rt)[/\w]*/)([\w]+)'
captures:
'1': {name: entity.name.section.topas}
'2': {name: entity.other.attribute-name.topas}
string:
name: string.quoted.double.topas
begin: '"'
end: '"'
numeric:
name: constant.numeric.topas
match: '(?<!\w)[-+]?(\d+(\.\d*)?|\.\d+)([eE][-+]?\d+)?'
boolean:
name: constant.language.topas
match: '"(?i:(true|false|t|f|1|0))"'
operator:
name: keyword.operator.topas
match: (=| [-+*] )
...