|
1 { |
|
2 "comment": "Grammar based on description from http://artis.imag.fr/~Xavier.Decoret/resources/xdkbibtex/bibtex_summary.html#comment\n\t\n\tTODO: Does not support @preamble\n\t", |
|
3 "fileTypes": [ |
|
4 "bib" |
|
5 ], |
|
6 "name": "BibTeX+", |
|
7 "patterns": [ |
|
8 { |
|
9 "begin": "@Comment", |
|
10 "beginCaptures": { |
|
11 "0": { |
|
12 "name": "punctuation.definition.comment.bibtex" |
|
13 } |
|
14 }, |
|
15 "end": "$\\n?", |
|
16 "name": "comment.line.at-sign.bibtex" |
|
17 }, |
|
18 { |
|
19 "begin": "((@)String)\\s*(\\{)\\s*([a-zA-Z]*)", |
|
20 "beginCaptures": { |
|
21 "1": { |
|
22 "name": "keyword.other.string-constant.bibtex" |
|
23 }, |
|
24 "2": { |
|
25 "name": "punctuation.definition.keyword.bibtex" |
|
26 }, |
|
27 "3": { |
|
28 "name": "punctuation.section.string-constant.begin.bibtex" |
|
29 }, |
|
30 "4": { |
|
31 "name": "variable.other.bibtex" |
|
32 } |
|
33 }, |
|
34 "end": "\\}", |
|
35 "endCaptures": { |
|
36 "0": { |
|
37 "name": "punctuation.section.string-constant.end.bibtex" |
|
38 } |
|
39 }, |
|
40 "name": "meta.string-constant.braces.bibtex", |
|
41 "patterns": [ |
|
42 { |
|
43 "include": "#string_content" |
|
44 } |
|
45 ] |
|
46 }, |
|
47 { |
|
48 "begin": "((@)String)\\s*(\\()\\s*([a-zA-Z]*)", |
|
49 "beginCaptures": { |
|
50 "1": { |
|
51 "name": "keyword.other.string-constant.bibtex" |
|
52 }, |
|
53 "2": { |
|
54 "name": "punctuation.definition.keyword.bibtex" |
|
55 }, |
|
56 "3": { |
|
57 "name": "punctuation.section.string-constant.begin.bibtex" |
|
58 }, |
|
59 "4": { |
|
60 "name": "variable.other.bibtex" |
|
61 } |
|
62 }, |
|
63 "end": "\\)", |
|
64 "endCaptures": { |
|
65 "0": { |
|
66 "name": "punctuation.section.string-constant.end.bibtex" |
|
67 } |
|
68 }, |
|
69 "name": "meta.string-constant.parenthesis.bibtex", |
|
70 "patterns": [ |
|
71 { |
|
72 "include": "#string_content" |
|
73 } |
|
74 ] |
|
75 }, |
|
76 { |
|
77 "begin": "((@)[a-zA-Z]+)\\s*(\\{)\\s*([^\\s,]*)", |
|
78 "beginCaptures": { |
|
79 "1": { |
|
80 "name": "keyword.other.entry-type.bibtex" |
|
81 }, |
|
82 "2": { |
|
83 "name": "punctuation.definition.keyword.bibtex" |
|
84 }, |
|
85 "3": { |
|
86 "name": "punctuation.section.entry.begin.bibtex" |
|
87 }, |
|
88 "4": { |
|
89 "name": "entity.name.type.entry-key.bibtex" |
|
90 } |
|
91 }, |
|
92 "end": "\\}", |
|
93 "endCaptures": { |
|
94 "0": { |
|
95 "name": "punctuation.section.entry.end.bibtex" |
|
96 } |
|
97 }, |
|
98 "name": "meta.entry.braces.bibtex", |
|
99 "patterns": [ |
|
100 { |
|
101 "begin": "([a-zA-Z0-9\\!\\$\\&\\*\\+\\-\\.\\/\\:\\;\\<\\>\\?\\[\\]\\^\\_\\`\\|]+)\\s*(\\=)", |
|
102 "beginCaptures": { |
|
103 "1": { |
|
104 "name": "support.function.key.bibtex" |
|
105 }, |
|
106 "2": { |
|
107 "name": "punctuation.separator.key-value.bibtex" |
|
108 } |
|
109 }, |
|
110 "end": "(?=[,}])", |
|
111 "name": "meta.key-assignment.bibtex", |
|
112 "patterns": [ |
|
113 { |
|
114 "include": "#string_content" |
|
115 }, |
|
116 { |
|
117 "include": "#integer" |
|
118 } |
|
119 ] |
|
120 } |
|
121 ] |
|
122 }, |
|
123 { |
|
124 "begin": "((@)[a-zA-Z]+)\\s*(\\()\\s*([^\\s,]*)", |
|
125 "beginCaptures": { |
|
126 "1": { |
|
127 "name": "keyword.other.entry-type.bibtex" |
|
128 }, |
|
129 "2": { |
|
130 "name": "punctuation.definition.keyword.bibtex" |
|
131 }, |
|
132 "3": { |
|
133 "name": "punctuation.section.entry.begin.bibtex" |
|
134 }, |
|
135 "4": { |
|
136 "name": "entity.name.type.entry-key.bibtex" |
|
137 } |
|
138 }, |
|
139 "end": "\\)", |
|
140 "endCaptures": { |
|
141 "0": { |
|
142 "name": "punctuation.section.entry.end.bibtex" |
|
143 } |
|
144 }, |
|
145 "name": "meta.entry.parenthesis.bibtex", |
|
146 "patterns": [ |
|
147 { |
|
148 "begin": "([a-zA-Z0-9\\!\\$\\&\\*\\+\\-\\.\\/\\:\\;\\<\\>\\?\\[\\]\\^\\_\\`\\|]+)\\s*(\\=)", |
|
149 "beginCaptures": { |
|
150 "1": { |
|
151 "name": "support.function.key.bibtex" |
|
152 }, |
|
153 "2": { |
|
154 "name": "punctuation.separator.key-value.bibtex" |
|
155 } |
|
156 }, |
|
157 "end": "(?=[,)])", |
|
158 "name": "meta.key-assignment.bibtex", |
|
159 "patterns": [ |
|
160 { |
|
161 "include": "#string_content" |
|
162 }, |
|
163 { |
|
164 "include": "#integer" |
|
165 } |
|
166 ] |
|
167 } |
|
168 ] |
|
169 }, |
|
170 { |
|
171 "begin": "[^@\\n]", |
|
172 "end": "(?=@)", |
|
173 "name": "comment.block.bibtex" |
|
174 } |
|
175 ], |
|
176 "repository": { |
|
177 "integer": { |
|
178 "match": "\\d+", |
|
179 "name": "constant.numeric.bibtex" |
|
180 }, |
|
181 "nested_braces": { |
|
182 "begin": "(?<!\\\\)\\{", |
|
183 "beginCaptures": { |
|
184 "0": { |
|
185 "name": "punctuation.definition.group.begin.bibtex" |
|
186 } |
|
187 }, |
|
188 "end": "(?<!\\\\)\\}", |
|
189 "endCaptures": { |
|
190 "0": { |
|
191 "name": "punctuation.definition.group.end.bibtex" |
|
192 } |
|
193 }, |
|
194 "patterns": [ |
|
195 { |
|
196 "include": "#nested_braces" |
|
197 } |
|
198 ] |
|
199 }, |
|
200 "string_content": { |
|
201 "patterns": [ |
|
202 { |
|
203 "begin": "\\{", |
|
204 "beginCaptures": { |
|
205 "0": { |
|
206 "name": "punctuation.definition.string.begin.bibtex" |
|
207 } |
|
208 }, |
|
209 "end": "\\}(?=,?\\s*\\n)", |
|
210 "endCaptures": { |
|
211 "0": { |
|
212 "name": "punctuation.definition.string.end.bibtex" |
|
213 } |
|
214 }, |
|
215 "patterns": [ |
|
216 { |
|
217 "match": "@", |
|
218 "name": "invalid.illegal.at-sign.bibtex" |
|
219 }, |
|
220 { |
|
221 "include": "#nested_braces" |
|
222 } |
|
223 ] |
|
224 }, |
|
225 { |
|
226 "begin": "\"", |
|
227 "beginCaptures": { |
|
228 "0": { |
|
229 "name": "punctuation.definition.string.begin.bibtex" |
|
230 } |
|
231 }, |
|
232 "end": "\"(?=,?\\s*\\n)", |
|
233 "endCaptures": { |
|
234 "0": { |
|
235 "name": "punctuation.definition.string.end.bibtex" |
|
236 } |
|
237 }, |
|
238 "patterns": [ |
|
239 { |
|
240 "match": "@", |
|
241 "name": "invalid.illegal.at-sign.bibtex" |
|
242 } |
|
243 ] |
|
244 } |
|
245 |
|
246 ] |
|
247 } |
|
248 }, |
|
249 "scopeName": "text.bibtex", |
|
250 "uuid": "47F30BA1-6B1D-11D9-9A60-000D93589AF6" |
|
251 } |