-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathashx.sublime-syntax
More file actions
59 lines (50 loc) · 1.77 KB
/
ashx.sublime-syntax
File metadata and controls
59 lines (50 loc) · 1.77 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
%YAML 1.2
---
# http://www.sublimetext.com/docs/syntax.html
name: .Net Web Handler (ASHX)
scope: source.cs.webforms.ashx
version: 2
extends: Packages/C#/C#.sublime-syntax
file_extensions:
- ashx
first_line_match: <%@\s*WebHandler
contexts:
shebang:
- include: directives
directive-generic-attribute:
- match: '\b(\w+)\s*(=)\s*((")[^"]*("))\s*'
captures:
1: entity.other.attribute-name.cshtml
2: punctuation.separator.key-value.cshtml
3: string.quoted.double.cshtml
4: punctuation.definition.string.begin.cshtml
5: punctuation.definition.string.end.cshtml
directive-end:
- match: '%>'
scope: punctuation.section.embedded.end.cshtml
pop: true
directives:
# https://msdn.microsoft.com/en-us/library/xz702w3e(v=vs.100).aspx
- match: '<%@'
scope: punctuation.section.embedded.begin.cshtml
set:
- meta_scope: meta.block.processing-directive.cshtml
- include: directive-type
- include: directive-other
- include: directive-end
directive-type:
# https://msdn.microsoft.com/en-us/library/ms366713(v=vs.100).aspx
- match: '\b(?i:WebHandler)\b'
scope: constant.language.processing-directive.type.cshtml entity.name.class.cs
set:
- meta_scope: meta.block.processing-directive.contents.type.cshtml
- include: directive-generic-attribute
- include: directive-end
directive-other:
# https://msdn.microsoft.com/en-us/library/xz702w3e(v=vs.100).aspx
- match: '\b(?i:Import|Implements|Assembly|OutputCache|Reference)\b'
scope: punctuation.section.embedded.begin.cshtml
push:
- meta_scope: meta.block.processing-directive.contents.cshtml
- include: directive-generic-attribute
- include: directive-end