-
Notifications
You must be signed in to change notification settings - Fork 2
/
Ant.sublime-syntax
118 lines (118 loc) · 3.5 KB
/
Ant.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
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: Ant
file_extensions:
- ant.xml
- build.xml
first_line_match: <\!--\s*ant\s*-->
scope: text.xml.ant
contexts:
main:
- match: "<[!%]--"
captures:
0: punctuation.definition.comment.xml.ant
push:
- meta_scope: comment.block.xml.ant
- match: "--%?>"
captures:
0: punctuation.definition.comment.xml.ant
pop: true
- match: (<target)\b
captures:
1: entity.name.tag.target.xml.ant
push:
- meta_scope: meta.tag.target.xml.ant
- match: (/?>)
captures:
1: entity.name.tag.target.xml.ant
pop: true
- include: tagStuff
- match: (<macrodef)\b
captures:
1: entity.name.tag.macrodef.xml.ant
push:
- meta_scope: meta.tag.macrodef.xml.ant
- match: (/?>)
captures:
1: entity.name.tag.macrodef.xml.ant
pop: true
- include: tagStuff
- match: "(</?)(?:([-_a-zA-Z0-9]+)((:)))?([-_a-zA-Z0-9:]+)"
captures:
1: punctuation.definition.tag.xml.ant
2: entity.name.tag.namespace.xml.ant
3: entity.name.tag.xml.ant
4: punctuation.separator.namespace.xml.ant
5: entity.name.tag.localname.xml.ant
push:
- meta_scope: meta.tag.xml.ant
- match: (/?>)
captures:
1: punctuation.definition.tag.xml.ant
2: entity.name.tag.namespace.xml.ant
3: entity.name.tag.xml.ant
4: punctuation.separator.namespace.xml.ant
5: entity.name.tag.localname.xml.ant
pop: true
- include: tagStuff
- include: scope:text.xml
- include: javaProperties
- include: javaAttributes
doublequotedString:
- match: '"'
captures:
0: punctuation.definition.string.begin.xml.ant
push:
- meta_scope: string.quoted.double.xml.ant
- match: '"'
captures:
0: punctuation.definition.string.end.xml.ant
pop: true
- include: javaAttributes
- include: javaProperties
javaAttributes:
- match: '@\{'
captures:
0: punctuation.section.embedded.begin.ant
push:
- meta_scope: meta.embedded.line.java
- meta_content_scope: source.java
- match: '(\})'
captures:
0: punctuation.section.embedded.end.ant
1: source.java
pop: true
javaProperties:
- match: '\$\{'
captures:
0: punctuation.section.embedded.begin.ant
push:
- meta_scope: meta.embedded.line.java-props
- meta_content_scope: source.java-props
- match: '(\})'
captures:
0: punctuation.section.embedded.end.ant
1: source.java-props
pop: true
singlequotedString:
- match: "'"
captures:
0: punctuation.definition.string.begin.xml.ant
push:
- meta_scope: string.quoted.single.xml.ant
- match: "'"
captures:
0: punctuation.definition.string.end.xml.ant
pop: true
- include: javaAttributes
- include: javaProperties
tagStuff:
- match: " (?:([-_a-zA-Z0-9]+)((:)))?([_a-zA-Z-]+)="
captures:
1: entity.other.attribute-name.namespace.xml.ant
2: entity.other.attribute-name.xml.ant
3: punctuation.separator.namespace.xml.ant
4: entity.other.attribute-name.localname.xml.ant
- include: doublequotedString
- include: singlequotedString