-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsoarUnit.YAML-tmLanguage
53 lines (45 loc) · 1.24 KB
/
soarUnit.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
# [PackageDev] target_format: plist, ext: tmLanguage
name: SoarUnit
scopeName: source.soarunit
fileTypes: [soarunit]
uuid: aea98b91-6d27-4092-a4b2-9969e89af5f8
# make setup {} and test {} blocks that contain Soar source code
# setting name to source.soar enables snippets, etc., and including
# source.soar syntax enables highlighting.
patterns:
- comment: setup block run before each test block
name: source.soar
begin: (setup)\s+({)
end: (\})
beginCaptures:
'1': {name: support.function.soarunit}
'2': {name: keyword.operator.soarunit}
endCaptures:
'1': {name: keyword.operator.soarunit}
patterns:
- include: source.soar
- comment: test block
name: source.soar
begin: (test)\s+(.+)\s+({)
beginCaptures:
'1': {name: support.function.soarunit}
'2': {name: string.unquoted.soarunit}
'3': {name: keyword.operator.soarunit}
end: (\})
endCaptures:
'1': {name: keyword.operator.soarunit}
patterns:
- include: source.soar
- include: source.soardoc
- comment: end-of-line comments
name: comment.line.number-sign.soar
match: (;\s*)?\#.*$
repository:
quoted-string:
begin: \"
end: \"
patterns:
- include: escaped-char
escaped-char:
name: constant.character.escape.soar
match: \\.