-
Notifications
You must be signed in to change notification settings - Fork 0
/
SemiCollection.sublime-syntax
69 lines (66 loc) · 2.15 KB
/
SemiCollection.sublime-syntax
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
%YAML 1.2
---
name: SemiCollection
file_extensions: [ semi.coll ]
scope: source.semicoll
variables:
str_keywords: \b(name|spritesheet)\b
identifier: "[a-z0-9_\\-]*"
namespace_identifier: "[@a-z0-9_]*"
unit: ((\d+)x(\d+))
geometry: ((\d+),(\d+))(([\t ]+)((\d+)x(\d+)))?
contexts:
main:
- match: "(\\$namespace)[ \\t]+({{namespace_identifier}}$)"
captures:
1: keyword.control.semicoll
2: string.unquoted.semicoll
3: string.unquoted.semicoll
- match: "(\\$patch)\\s+$"
captures:
1: keyword.control.semicoll
- match: "(\\$attachpoint)\\s+([^ \\t]+)\\s+(.+)$"
captures:
1: keyword.control.semicoll
2: support.class.semicoll
3: string.unquoted.semicoll
- match: "(\\$id)[ \\t]+({{identifier}}$)"
captures:
1: keyword.control.semicoll
2: string.unquoted.semicoll
3: string.unquoted.semicoll
- match: "(\\${{str_keywords}})[ \\t]*(.*)"
captures:
1: keyword.control.semicoll
3: string.unquoted.semicoll
- match: "(\\$(unit|size))[ \\t]*{{unit}}"
captures:
1: keyword.control.semicoll
3: constant.numeric.semicoll
- match: "^({{namespace_identifier}}:)?({{identifier}})[ \\t]+({{geometry}})?"
captures:
1: keyword.control.semicoll
2: string.unquoted.semicoll
4: constant.numeric.semicoll
9: constant.numeric.semicoll
push:
- meta_scope: meta.function-call
- match: \b(fliph|flipv)\b
scope: keyword.control.semicoll
- match: "(\\s+(at)\\s+([^ \\t]+)\\s+([0-9.\\-]+),([0-9.\\-]+)(\\s+angle\\s+([0-9.\\-]+))?)?"
captures:
2: keyword.control.semicoll
3: support.class.semicoll
4: constant.numeric.semicoll
5: constant.numeric.semicoll
6: keyword.control.semicoll
7: constant.numeric.semicoll
- match: "( (override)[\t ]+(.+))?[\t ]*$"
captures:
2: keyword.control.semicoll
3: string.unquoted.semicoll
pop: true
- match: .
scope: invalid.illegal
- match: "^.*$"
scope: invalid.illegal