PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.28.0
Code Block Pro – Beautiful Syntax Highlighting v1.28.0
1.27.1 1.27.2 1.27.3 1.27.4 1.27.5 1.27.6 1.27.7 1.28.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.6.0 1.7.0 1.8.0 1.9.0 1.9.1 1.9.2 1.9.3 trunk 1.1.0 1.10.0 1.11.0 1.11.1 All 63 releases
code-block-pro / build / shiki / languages / make.tmLanguage.json

make.tmLanguage.json in Code Block Pro – Beautiful Syntax Highlighting 1.28.0, at build/shiki/languages/make.tmLanguage.json

635 lines 16.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 {
2 "information_for_contributors": [
3 "This file has been converted from https://github.com/fadeevab/make.tmbundle/blob/master/Syntaxes/Makefile.plist",
4 "If you want to provide a fix or improvement, please create a pull request against the original repository.",
5 "Once accepted there, we are happy to receive an update request."
6 ],
7 "version": "https://github.com/fadeevab/make.tmbundle/commit/1d4c0b541959995db098df751ffc129da39a294b",
8 "name": "make",
9 "scopeName": "source.makefile",
10 "patterns": [
11 {
12 "include": "#comment"
13 },
14 {
15 "include": "#variables"
16 },
17 {
18 "include": "#variable-assignment"
19 },
20 {
21 "include": "#directives"
22 },
23 {
24 "include": "#recipe"
25 },
26 {
27 "include": "#target"
28 }
29 ],
30 "repository": {
31 "comma": {
32 "match": ",",
33 "name": "punctuation.separator.delimeter.comma.makefile"
34 },
35 "comment": {
36 "begin": "(^[ ]+)?((?<!\\\\)(\\\\\\\\)*)(?=#)",
37 "beginCaptures": {
38 "1": {
39 "name": "punctuation.whitespace.comment.leading.makefile"
40 }
41 },
42 "end": "(?!\\G)",
43 "patterns": [
44 {
45 "begin": "#",
46 "beginCaptures": {
47 "0": {
48 "name": "punctuation.definition.comment.makefile"
49 }
50 },
51 "end": "(?=[^\\\\])$",
52 "name": "comment.line.number-sign.makefile",
53 "patterns": [
54 {
55 "match": "\\\\\\n",
56 "name": "constant.character.escape.continuation.makefile"
57 }
58 ]
59 }
60 ]
61 },
62 "directives": {
63 "patterns": [
64 {
65 "begin": "^[ ]*([s\\-]?include)\\b",
66 "beginCaptures": {
67 "1": {
68 "name": "keyword.control.include.makefile"
69 }
70 },
71 "end": "^",
72 "patterns": [
73 {
74 "include": "#comment"
75 },
76 {
77 "include": "#variables"
78 },
79 {
80 "match": "%",
81 "name": "constant.other.placeholder.makefile"
82 }
83 ]
84 },
85 {
86 "begin": "^[ ]*(vpath)\\b",
87 "beginCaptures": {
88 "1": {
89 "name": "keyword.control.vpath.makefile"
90 }
91 },
92 "end": "^",
93 "patterns": [
94 {
95 "include": "#comment"
96 },
97 {
98 "include": "#variables"
99 },
100 {
101 "match": "%",
102 "name": "constant.other.placeholder.makefile"
103 }
104 ]
105 },
106 {
107 "begin": "^\\s*(?:(override)\\s*)?(define)\\s*([^\\s]+)\\s*(=|\\?=|:=|\\+=)?(?=\\s)",
108 "captures": {
109 "1": {
110 "name": "keyword.control.override.makefile"
111 },
112 "2": {
113 "name": "keyword.control.define.makefile"
114 },
115 "3": {
116 "name": "variable.other.makefile"
117 },
118 "4": {
119 "name": "punctuation.separator.key-value.makefile"
120 }
121 },
122 "end": "^\\s*(endef)\\b",
123 "name": "meta.scope.conditional.makefile",
124 "patterns": [
125 {
126 "begin": "\\G(?!\\n)",
127 "end": "^",
128 "patterns": [
129 {
130 "include": "#comment"
131 }
132 ]
133 },
134 {
135 "include": "#variables"
136 },
137 {
138 "include": "#directives"
139 }
140 ]
141 },
142 {
143 "begin": "^[ ]*(export)\\b",
144 "beginCaptures": {
145 "1": {
146 "name": "keyword.control.$1.makefile"
147 }
148 },
149 "end": "^",
150 "patterns": [
151 {
152 "include": "#comment"
153 },
154 {
155 "include": "#variable-assignment"
156 },
157 {
158 "match": "[^\\s]+",
159 "name": "variable.other.makefile"
160 }
161 ]
162 },
163 {
164 "begin": "^[ ]*(override|private)\\b",
165 "beginCaptures": {
166 "1": {
167 "name": "keyword.control.$1.makefile"
168 }
169 },
170 "end": "^",
171 "patterns": [
172 {
173 "include": "#comment"
174 },
175 {
176 "include": "#variable-assignment"
177 }
178 ]
179 },
180 {
181 "begin": "^[ ]*(unexport|undefine)\\b",
182 "beginCaptures": {
183 "1": {
184 "name": "keyword.control.$1.makefile"
185 }
186 },
187 "end": "^",
188 "patterns": [
189 {
190 "include": "#comment"
191 },
192 {
193 "match": "[^\\s]+",
194 "name": "variable.other.makefile"
195 }
196 ]
197 },
198 {
199 "begin": "^\\s*(ifeq|ifneq|ifdef|ifndef)(?=\\s)",
200 "captures": {
201 "1": {
202 "name": "keyword.control.$1.makefile"
203 }
204 },
205 "end": "^\\s*(endif)\\b",
206 "name": "meta.scope.conditional.makefile",
207 "patterns": [
208 {
209 "begin": "\\G",
210 "end": "^",
211 "name": "meta.scope.condition.makefile",
212 "patterns": [
213 {
214 "include": "#comma"
215 },
216 {
217 "include": "#variables"
218 },
219 {
220 "include": "#comment"
221 }
222 ]
223 },
224 {
225 "begin": "^\\s*else(?=\\s)\\s*(ifeq|ifneq|ifdef|ifndef)*(?=\\s)",
226 "beginCaptures": {
227 "0": {
228 "name": "keyword.control.else.makefile"
229 }
230 },
231 "end": "^",
232 "patterns": [
233 {
234 "include": "#comma"
235 },
236 {
237 "include": "#variables"
238 },
239 {
240 "include": "#comment"
241 }
242 ]
243 },
244 {
245 "include": "$self"
246 }
247 ]
248 }
249 ]
250 },
251 "target": {
252 "begin": "^(?!\\t)([^:]*)(:)(?!\\=)",
253 "beginCaptures": {
254 "1": {
255 "patterns": [
256 {
257 "captures": {
258 "1": {
259 "name": "support.function.target.$1.makefile"
260 }
261 },
262 "match": "^\\s*(\\.(PHONY|SUFFIXES|DEFAULT|PRECIOUS|INTERMEDIATE|SECONDARY|SECONDEXPANSION|DELETE_ON_ERROR|IGNORE|LOW_RESOLUTION_TIME|SILENT|EXPORT_ALL_VARIABLES|NOTPARALLEL|ONESHELL|POSIX))\\s*$"
263 },
264 {
265 "begin": "(?=\\S)",
266 "end": "(?=\\s|$)",
267 "name": "entity.name.function.target.makefile",
268 "patterns": [
269 {
270 "include": "#variables"
271 },
272 {
273 "match": "%",
274 "name": "constant.other.placeholder.makefile"
275 }
276 ]
277 }
278 ]
279 },
280 "2": {
281 "name": "punctuation.separator.key-value.makefile"
282 }
283 },
284 "end": "[^\\\\]$",
285 "name": "meta.scope.target.makefile",
286 "patterns": [
287 {
288 "begin": "\\G",
289 "end": "(?=[^\\\\])$",
290 "name": "meta.scope.prerequisites.makefile",
291 "patterns": [
292 {
293 "match": "\\\\\\n",
294 "name": "constant.character.escape.continuation.makefile"
295 },
296 {
297 "match": "%|\\*",
298 "name": "constant.other.placeholder.makefile"
299 },
300 {
301 "include": "#comment"
302 },
303 {
304 "include": "#variables"
305 }
306 ]
307 }
308 ]
309 },
310 "recipe": {
311 "begin": "^\\t([+\\-@]*)",
312 "beginCaptures": {
313 "1": {
314 "name": "keyword.control.$1.makefile"
315 }
316 },
317 "end": "[^\\\\]$",
318 "name": "meta.scope.recipe.makefile",
319 "patterns": [
320 {
321 "match": "\\\\\\n",
322 "name": "constant.character.escape.continuation.makefile"
323 },
324 {
325 "include": "#variables"
326 }
327 ]
328 },
329 "variable-assignment": {
330 "begin": "(^[ ]*|\\G\\s*)([^\\s:#=]+)\\s*((?<![?:+!])=|\\?=|:=|\\+=|!=)",
331 "beginCaptures": {
332 "2": {
333 "name": "variable.other.makefile",
334 "patterns": [
335 {
336 "include": "#variables"
337 }
338 ]
339 },
340 "3": {
341 "name": "punctuation.separator.key-value.makefile"
342 }
343 },
344 "end": "\\n",
345 "patterns": [
346 {
347 "match": "\\\\\\n",
348 "name": "constant.character.escape.continuation.makefile"
349 },
350 {
351 "include": "#comment"
352 },
353 {
354 "include": "#variables"
355 }
356 ]
357 },
358 "interpolation": {
359 "patterns": [
360 {
361 "include": "#parentheses-interpolation"
362 },
363 {
364 "include": "#braces-interpolation"
365 }
366 ]
367 },
368 "parentheses-interpolation": {
369 "begin": "\\(",
370 "end": "\\)",
371 "patterns": [
372 {
373 "include": "#variables"
374 },
375 {
376 "include": "#interpolation"
377 }
378 ]
379 },
380 "braces-interpolation": {
381 "begin": "{",
382 "end": "}",
383 "patterns": [
384 {
385 "include": "#variables"
386 },
387 {
388 "include": "#interpolation"
389 }
390 ]
391 },
392 "variables": {
393 "patterns": [
394 {
395 "include": "#simple-variable"
396 },
397 {
398 "include": "#variable-parentheses"
399 },
400 {
401 "include": "#variable-braces"
402 }
403 ]
404 },
405 "simple-variable": {
406 "patterns": [
407 {
408 "match": "\\$[^(){}]",
409 "name": "variable.language.makefile"
410 }
411 ]
412 },
413 "variable-parentheses": {
414 "patterns": [
415 {
416 "begin": "\\$\\(",
417 "captures": {
418 "0": {
419 "name": "punctuation.definition.variable.makefile"
420 }
421 },
422 "end": "\\)|((?<!\\\\)\\n)",
423 "name": "string.interpolated.makefile",
424 "patterns": [
425 {
426 "include": "#variables"
427 },
428 {
429 "include": "#builtin-variable-parentheses"
430 },
431 {
432 "include": "#function-variable-parentheses"
433 },
434 {
435 "include": "#flavor-variable-parentheses"
436 },
437 {
438 "include": "#another-variable-parentheses"
439 }
440 ]
441 }
442 ]
443 },
444 "variable-braces": {
445 "patterns": [
446 {
447 "begin": "\\${",
448 "captures": {
449 "0": {
450 "name": "punctuation.definition.variable.makefile"
451 }
452 },
453 "end": "}|((?<!\\\\)\\n)",
454 "name": "string.interpolated.makefile",
455 "patterns": [
456 {
457 "include": "#variables"
458 },
459 {
460 "include": "#builtin-variable-braces"
461 },
462 {
463 "include": "#function-variable-braces"
464 },
465 {
466 "include": "#flavor-variable-braces"
467 },
468 {
469 "include": "#another-variable-braces"
470 }
471 ]
472 }
473 ]
474 },
475 "builtin-variable-parentheses": {
476 "patterns": [
477 {
478 "match": "(?<=\\()(MAKEFILES|VPATH|SHELL|MAKESHELL|MAKE|MAKELEVEL|MAKEFLAGS|MAKECMDGOALS|CURDIR|SUFFIXES|\\.LIBPATTERNS)(?=\\s*\\))",
479 "name": "variable.language.makefile"
480 }
481 ]
482 },
483 "builtin-variable-braces": {
484 "patterns": [
485 {
486 "match": "(?<={)(MAKEFILES|VPATH|SHELL|MAKESHELL|MAKE|MAKELEVEL|MAKEFLAGS|MAKECMDGOALS|CURDIR|SUFFIXES|\\.LIBPATTERNS)(?=\\s*})",
487 "name": "variable.language.makefile"
488 }
489 ]
490 },
491 "function-variable-parentheses": {
492 "patterns": [
493 {
494 "begin": "(?<=\\()(subst|patsubst|strip|findstring|filter(-out)?|sort|word(list)?|firstword|lastword|dir|notdir|suffix|basename|addsuffix|addprefix|join|wildcard|realpath|abspath|info|error|warning|shell|foreach|if|or|and|call|eval|value|file|guile)\\s",
495 "beginCaptures": {
496 "1": {
497 "name": "support.function.$1.makefile"
498 }
499 },
500 "end": "(?=\\)|((?<!\\\\)\\n))",
501 "name": "meta.scope.function-call.makefile",
502 "patterns": [
503 {
504 "include": "#comma"
505 },
506 {
507 "include": "#variables"
508 },
509 {
510 "include": "#interpolation"
511 },
512 {
513 "match": "%|\\*",
514 "name": "constant.other.placeholder.makefile"
515 },
516 {
517 "match": "\\\\\\n",
518 "name": "constant.character.escape.continuation.makefile"
519 }
520 ]
521 }
522 ]
523 },
524 "function-variable-braces": {
525 "patterns": [
526 {
527 "begin": "(?<={)(subst|patsubst|strip|findstring|filter(-out)?|sort|word(list)?|firstword|lastword|dir|notdir|suffix|basename|addsuffix|addprefix|join|wildcard|realpath|abspath|info|error|warning|shell|foreach|if|or|and|call|eval|value|file|guile)\\s",
528 "beginCaptures": {
529 "1": {
530 "name": "support.function.$1.makefile"
531 }
532 },
533 "end": "(?=}|((?<!\\\\)\\n))",
534 "name": "meta.scope.function-call.makefile",
535 "patterns": [
536 {
537 "include": "#comma"
538 },
539 {
540 "include": "#variables"
541 },
542 {
543 "include": "#interpolation"
544 },
545 {
546 "match": "%|\\*",
547 "name": "constant.other.placeholder.makefile"
548 },
549 {
550 "match": "\\\\\\n",
551 "name": "constant.character.escape.continuation.makefile"
552 }
553 ]
554 }
555 ]
556 },
557 "flavor-variable-parentheses": {
558 "patterns": [
559 {
560 "begin": "(?<=\\()(origin|flavor)\\s(?=[^\\s)]+\\s*\\))",
561 "contentName": "variable.other.makefile",
562 "beginCaptures": {
563 "1": {
564 "name": "support.function.$1.makefile"
565 }
566 },
567 "end": "(?=\\))",
568 "name": "meta.scope.function-call.makefile",
569 "patterns": [
570 {
571 "include": "#variables"
572 }
573 ]
574 }
575 ]
576 },
577 "flavor-variable-braces": {
578 "patterns": [
579 {
580 "begin": "(?<={)(origin|flavor)\\s(?=[^\\s}]+\\s*})",
581 "contentName": "variable.other.makefile",
582 "beginCaptures": {
583 "1": {
584 "name": "support.function.$1.makefile"
585 }
586 },
587 "end": "(?=})",
588 "name": "meta.scope.function-call.makefile",
589 "patterns": [
590 {
591 "include": "#variables"
592 }
593 ]
594 }
595 ]
596 },
597 "another-variable-parentheses": {
598 "patterns": [
599 {
600 "begin": "(?<=\\()(?!\\))",
601 "end": "(?=\\)|((?<!\\\\)\\n))",
602 "name": "variable.other.makefile",
603 "patterns": [
604 {
605 "include": "#variables"
606 },
607 {
608 "match": "\\\\\\n",
609 "name": "constant.character.escape.continuation.makefile"
610 }
611 ]
612 }
613 ]
614 },
615 "another-variable-braces": {
616 "patterns": [
617 {
618 "begin": "(?<={)(?!})",
619 "end": "(?=}|((?<!\\\\)\\n))",
620 "name": "variable.other.makefile",
621 "patterns": [
622 {
623 "include": "#variables"
624 },
625 {
626 "match": "\\\\\\n",
627 "name": "constant.character.escape.continuation.makefile"
628 }
629 ]
630 }
631 ]
632 }
633 }
634 }
635