-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgoption.sublime-syntax
More file actions
117 lines (102 loc) · 2.89 KB
/
Copy pathgoption.sublime-syntax
File metadata and controls
117 lines (102 loc) · 2.89 KB
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
%YAML 1.2
---
name: goption
file_extensions:
- goption
- goption
scope: source.goption
contexts:
main:
- include: profile-header
- include: item-list-sections
- include: section-headers
- include: comments
- include: file-types
- include: key-values
- include: folder-rights
- include: weapon-names
- include: option-lines
- include: inline-brackets
- include: commas
- include: numbers
- include: account-names
section-headers:
- match: ^\s*(\[)\s*([^\]]+?)\s*(\])
captures:
1: constant.language.goption
2: entity.name.section.goption
3: constant.language.goption
item-list-sections:
- match: ^\s*(\[)\s*(Weapons|Chests)\s*(\])
captures:
1: constant.language.goption
2: entity.name.section.goption
3: constant.language.goption
push: item-list-body
item-list-body:
- meta_scope: meta.list.goption
- match: ^\s*(?=\[[^\]]+\])
pop: true
- match: ^\s*#.*$
scope: comment.line.hash.goption
- match: ^\s*(\S.*)$
captures:
1: string.other.list-item.goption
comments:
- match: ^\s*#.*$
scope: comment.line.hash.goption
option-lines:
- match: '^\s*([\w.]+)(=)(.*)$'
captures:
1: variable.parameter.goption
2: keyword.operator.assignment.goption
3: string.unquoted.goption.option-value
inline-brackets:
- match: '(\[)([^\]]+)(\])'
captures:
1: constant.language.goption
2: constant.language.goption
3: constant.language.goption
commas:
- match: ','
scope: punctuation.separator.goption
file-types:
- match: '^\s*(file|level|body|shield|sword|head|gmap)\s+(.+)$'
captures:
1: variable.parameter.goption
2: string.other.filepath.goption
profile-header:
- match: '^(Profile for)\s+(.+)$'
captures:
1: keyword.control.goption
2: entity.name.class.goption
weapon-names:
- match: '^([-*])(.+)$'
captures:
1: keyword.operator.goption
2: constant.other.weapon.goption
account-names:
- match: '(?<=[=,])\s*([A-Za-z_][A-Za-z0-9_]*)'
captures:
1: entity.name.class.goption
key-values:
- match: '^([^:#\[]+)(:)\s+(true|false)\s*$'
captures:
1: variable.parameter.goption
2: punctuation.separator.goption
3: constant.language.boolean.goption
- match: '^([^:#\[]+)(:)\s*(.*)$'
captures:
1: variable.parameter.goption
2: punctuation.separator.goption
3: string.unquoted.goption
folder-rights:
- match: '\b(r |rw )([^\s/]+)((?:/[^\s/]+)*)(/\*)?'
captures:
1: constant.other.rights.goption
2: string.other.filepath.goption.folder
3: string.other.filepath.goption.folder
4: keyword.operator.wildcard.goption
numbers:
- match: '\b\d+\b'
scope: constant.numeric.goption