1 | Prism.languages.makefile = {
|
2 | 'comment': {
|
3 | pattern: /(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,
|
4 | lookbehind: true
|
5 | },
|
6 | 'string': {
|
7 | pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
|
8 | greedy: true
|
9 | },
|
10 |
|
11 | 'builtin-target': {
|
12 | pattern: /\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,
|
13 | alias: 'builtin'
|
14 | },
|
15 |
|
16 | 'target': {
|
17 | pattern: /^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,
|
18 | alias: 'symbol',
|
19 | inside: {
|
20 | 'variable': /\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/
|
21 | }
|
22 | },
|
23 | 'variable': /\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,
|
24 |
|
25 |
|
26 | 'keyword': /-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,
|
27 |
|
28 | 'function': {
|
29 | pattern: /(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,
|
30 | lookbehind: true
|
31 | },
|
32 | 'operator': /(?:::|[?:+!])?=|[|@]/,
|
33 | 'punctuation': /[:;(){}]/
|
34 | };
|