-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathLanguage.sublime-syntax
121 lines (111 loc) · 3.06 KB
/
Language.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
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
118
119
120
121
%YAML 1.2
---
name: Crackshell Language
file_extensions:
- lang
scope: text.xml.lang
contexts:
preprocessor-expression:
- match: '\b[A-Z0-9_]+\b'
scope: entity.name.constant
- match: '(\|\||&&)'
scope: keyword.operator.logical
- match: '"'
scope: punctuation.definition.string.begin
push:
- meta_scope: string.quoted.double
- match: '"'
scope: punctuation.definition.string.end
pop: true
- match: '$'
pop: true
has-preprocessor:
- match: '^\s*(%)'
captures:
1: keyword.control.import
push:
- meta_scope: meta.preprocessor
- match: '//.*'
scope: comment.line
- match: '(?i)(if|else|endif)\b'
scope: support.function
set: preprocessor-expression
- match: '(PROFILE_START|PROFILE_STOP)\b'
scope: support.function
set:
- meta_scope: string.unquoted
- match: '$'
pop: true
- match: '[A-Za-z_][A-Za-z0-9_]+'
scope: keyword.control.import
set: preprocessor-expression
- match: '$'
pop: true
comment:
- match: '<!--'
scope: punctuation.definition.comment.begin
push:
- meta_scope: comment.block
- match: '-->'
scope: punctuation.definition.comment.end
pop: true
- match: '-{2,}'
scope: invalid.illegal.double-hyphen-within-comment
string:
- meta_scope: string.quoted.double
- match: '"'
scope: punctuation.definition.string.end
pop: true
attributes:
- include: has-preprocessor
- match: '[A-Za-z0-9\-_]+\b'
scope: entity.other.attribute-name
push: attribute-value
- match: '(?=/?>)'
pop: true
attribute-value:
- match: '='
scope: punctuation.separator.key-value
- match: '"'
scope: punctuation.definition.string.begin
push: string
- match: ''
pop: true
main:
- include: comment
- include: has-preprocessor
- match: '(<)/?$'
captures:
1: invalid.illegal.missing-entity
- match: '<'
scope: punctuation.definition.tag.begin
push:
- meta_scope: meta.tag.xml
- match: '/?>'
scope: punctuation.definition.tag.end
pop: true
- match: '/'
scope: punctuation.definition.tag.begin
- match: '\b(lang)\s*\b'
captures:
1: entity.name.tag storage.type
push:
- match: '(name)\b'
scope: support.other
push: attribute-value
- include: attributes
- match: '\b(string)\s*\b'
captures:
1: entity.name.tag storage.type
push:
- match: '(name)\b'
scope: support.other
push: attribute-value
- include: attributes
- match: '\b[A-Za-z0-9\-_]+\b'
scope: invalid.illegal.unsupported-type
- match: '\s+'
push: attributes
- match: '((%)[^%\s]+(%))'
captures:
1: constant.other.placeholder