main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | 'use strict'
|
---|
2 |
|
---|
3 | module.exports = makefile
|
---|
4 | makefile.displayName = 'makefile'
|
---|
5 | makefile.aliases = []
|
---|
6 | function makefile(Prism) {
|
---|
7 | Prism.languages.makefile = {
|
---|
8 | comment: {
|
---|
9 | pattern: /(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,
|
---|
10 | lookbehind: true
|
---|
11 | },
|
---|
12 | string: {
|
---|
13 | pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
|
---|
14 | greedy: true
|
---|
15 | },
|
---|
16 | 'builtin-target': {
|
---|
17 | pattern: /\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,
|
---|
18 | alias: 'builtin'
|
---|
19 | },
|
---|
20 | target: {
|
---|
21 | pattern: /^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,
|
---|
22 | alias: 'symbol',
|
---|
23 | inside: {
|
---|
24 | variable: /\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/
|
---|
25 | }
|
---|
26 | },
|
---|
27 | variable: /\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,
|
---|
28 | // Directives
|
---|
29 | keyword:
|
---|
30 | /-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,
|
---|
31 | function: {
|
---|
32 | pattern:
|
---|
33 | /(\()(?: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])/,
|
---|
34 | lookbehind: true
|
---|
35 | },
|
---|
36 | operator: /(?:::|[?:+!])?=|[|@]/,
|
---|
37 | punctuation: /[:;(){}]/
|
---|
38 | }
|
---|
39 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.