-
Notifications
You must be signed in to change notification settings - Fork 0
/
tintin.sublime-syntax
151 lines (140 loc) · 5.76 KB
/
tintin.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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
%YAML 1.2
---
name: Bow Tintin
file_extensions: [tintin, tintin.php]
scope: text.tintin
contexts:
main:
- match: ''
push:
- include: 'scope:text.html.basic'
- meta_scope: text.html.tintin
pop: true
with_prototype:
- match: '{#'
captures:
0: punctuation.definition.comment.begin.tintin
push:
- meta_scope: comment.block.html.tintin
- match: '#}'
scope: punctuation.definition.comment.end.tintin
pop: true
- match: "#"
scope: invalid.illegal.bad-comments-or-CDATA.html.tintin
- match: '{##'
captures:
0: punctuation.definition.comment.begin.tintin
push:
- meta_scope: comment.block.html.tintin
- match: '##}'
scope: punctuation.definition.comment.end.tintin
pop: true
- match: "#"
scope: invalid.illegal.bad-comments-or-CDATA.html.tintin
- match: '\{\{\{?'
captures:
0: punctuation.section.embedded.begin.tintin
push:
- meta_scope: entity.name.tag.tintin
- meta_content_scope: source.php.tintin
- match: '\}?\}\}'
captures:
0: punctuation.section.embedded.end.tintin
1: punctuation.section.embedded.end.tintin
pop: true
- include: 'scope:source.php'
- match: '#\{\{\{?'
captures:
0: punctuation.section.embedded.ignore.begin.tintin
push:
- meta_scope: 'scope:text.html.basic'
- meta_content_scope: 'scope:text.html.basic'
- match: '\}?\}\}'
captures:
0: punctuation.section.embedded.ignore.end.tintin
1: punctuation.section.embedded.ignore.end.tintin
pop: true
- match: '<\?(?i:php|=)?'
captures:
0: punctuation.section.embedded.begin.tintin
push:
- meta_content_scope: source.php.tintin
- meta_scope: entity.name.tag.tintin
- match: (?=\?>)(\?>)
captures:
0: punctuation.section.embedded.end.tintin
pop: true
- include: 'scope:source.php'
- match: '((\s{0}|^)(#|%)(php)(?![^?]*\(*\))|<\?(?i:php|=)?)(?![^?]*\?>)'
scope: punctuation.section.embedded.begin.php
captures:
0: punctuation.section.embedded.begin.php
3: constant.other.inline-data.html
4: entity.name.tag.block.any.html
push:
- meta_content_scope: source.php
- meta_scope: meta.embedded.block.tintin.php
with_prototype:
- match: (?=\?>|(\s{0}|^)(#|%)(endphp))(\?>|(\s{0}|^)(#|%)(endphp))
captures:
0: punctuation.section.embedded.end.php
6: constant.other.inline-data.html
7: entity.name.tag.block.any.html
pop: true
- include: 'scope:source.php'
- match: '<\?(?i:php|=)?'
scope: punctuation.section.embedded.begin.php
push:
- meta_content_scope: source.php.tintin
- meta_scope: meta.embedded.line.tintin.php
with_prototype:
- match: (?=\?>)(\?>)
captures:
0: punctuation.section.embedded.end.php
pop: true
- include: 'scope:source.php'
- match: '(\s{0}|^)(\#|\%)\b(auth|stop|jump|elseif|elif|extends|for|loop|guest|if|isset|includeIf||includeWhen|php|block|unless|while|inject|verbatim|macro|import|env|production|class|hasflash|flash|empty|json|lang|notempty|raw)\b(?=(|\s*|)\(\()'
captures:
0: punctuation.section.embedded.php
2: constant.other.inline-data.html
3: entity.name.tag.block.any.html
push:
- meta_scope: custom.compiler.tintin.php
- meta_content_scope: source.php.tintin
- match: '(?<=\)\))'
pop: true
- include: 'scope:source.php'
- match: '(\s{0}|^)(\#|\%)\b(auth|stop|jump|elseif|else|elif|extends|for|loop|guest|if|isset|includeIf||includeWhen|php|block|unless|while|inject|verbatim|macro|import|env|production|class|hasflash|flash|empty|json|lang|notempty|raw)\b(?=(|\s*|)\()'
captures:
0: punctuation.section.embedded.php
2: constant.other.inline-data.html
3: entity.name.tag.block.any.html
push:
- meta_scope: custom.compiler.tintin.php
- meta_content_scope: source.php.tintin
- match: '(?<=\))'
pop: true
- include: 'scope:source.php'
- match: '(\s{0}|^)(\#|\%)\b(stop|jump|else|endempty|endauth|endauth|endlang|endguest|endfor|endloop|endif|endisset|endblock|endunless|endwhile|endphp|endverbatim|endhasflash|endguest|endlang|endproduction|endenv|endunlang|endnotempty|endmacro|endraw)\b'
scope: custom.compiler.tintin.php
captures:
0: punctuation.section.embedded.php
2: constant.other.inline-data.html
3: entity.name.tag.block.any.html
pop: false
- match: '(\s{0}|^)(\#|\%)\b([a-zA-Z_]+)\b(?=(|\s*|)\()'
captures:
0: support.function
2: constant.other.inline-data.html
push:
- meta_scope: custom.compiler.tintin.php
- meta_content_scope: source.php.tintin
- match: '(?<=\))'
pop: true
- include: 'scope:source.php'
- match: '(\s{0}|^)(\#|\%)\b([a-zA-Z_]+)\b(\s?)\b'
scope: custom.compiler.tintin.php
captures:
0: support.function
2: constant.other.inline-data.html
pop: false