forked from sublimehq/Packages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
HTML-ASP.sublime-syntax
61 lines (55 loc) · 1.6 KB
/
HTML-ASP.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
%YAML 1.2
---
# https://www.sublimetext.com/docs/3/syntax.html
name: HTML (ASP)
file_extensions:
- asp
scope: text.html.asp
contexts:
main:
- include: html
asp_punctuation_begin:
- match: '<%'
scope: punctuation.section.embedded.begin.asp
push:
- match: '@' # https://msdn.microsoft.com/en-us/library/ms525579%28v=vs.90%29.aspx
set: asp_directive
- match: '='
scope: punctuation.section.embedded.begin.asp
set: [close_embedded_asp, begin_embedded_asp_expression]
- match: '(?=\S)'
set: [close_embedded_asp, begin_embedded_asp]
asp_directive:
- match: '@?\s*\b((?i:ENABLESESSIONSTATE|LANGUAGE|LCID|TRANSACTION))\b'
captures:
1: constant.language.processing-directive.asp
push:
- match: '\s*(=)\s*'
scope: punctuation.separator.key-value.asp
pop: true
- match: '(?=%>)'
scope: punctuation.section.embedded.end.asp
pop: true
- match: '%>'
scope: punctuation.section.embedded.end.asp
pop: true
html:
- match: ''
set:
- include: scope:text.html.basic
with_prototype:
- include: asp_punctuation_begin
begin_embedded_asp:
- meta_content_scope: source.asp.embedded.html
- match: '(?=%>)'
pop: true
- include: scope:source.asp
begin_embedded_asp_expression:
- meta_content_scope: source.asp.embedded.html
- match: '(?=%>)'
pop: true
- include: scope:source.asp#expression
close_embedded_asp:
- match: '%>'
scope: punctuation.section.embedded.end.asp
pop: true