Added discussion feature to site.
[Assignment-Trapper.git] / sh_makefile.js
blob83cb374965095ff55b8c754e628a2b4957626385
1 if (! this.sh_languages) {
2   this.sh_languages = {};
4 sh_languages['makefile'] = [
5   [
6     [
7       /^[a-zA-Z0-9_-]+[\s]*=/g,
8       'sh_type',
9       -1
10     ],
11     [
12       /^\.[a-zA-Z0-9_-]+[\s]*:|@(?:.+)@/g,
13       'sh_preproc',
14       -1
15     ],
16     [
17       /^(?:[A-Za-z0-9_.\s-])+:/g,
18       'sh_symbol',
19       -1
20     ],
21     [
22       /%[a-zA-Z0-9_.-]+:%[a-zA-Z0-9_.-]+/g,
23       'sh_string',
24       -1
25     ],
26     [
27       /(?:[A-Za-z0-9_-]*)\.(?:[A-Za-z0-9_-]+)/g,
28       'sh_normal',
29       -1
30     ],
31     [
32       /\b(?:import)\b/g,
33       'sh_preproc',
34       -1
35     ],
36     [
37       /\b[+-]?(?:(?:0x[A-Fa-f0-9]+)|(?:(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?))u?(?:(?:int(?:8|16|32|64))|L)?\b/g,
38       'sh_number',
39       -1
40     ],
41     [
42       /\\"|\\'/g,
43       'sh_normal',
44       -1
45     ],
46     [
47       /"/g,
48       'sh_string',
49       1
50     ],
51     [
52       /'/g,
53       'sh_string',
54       2
55     ],
56     [
57       /function[ \t]+(?:[A-Za-z]|_)[A-Za-z0-9_]*[ \t]*(?:\(\))?|(?:[A-Za-z]|_)[A-Za-z0-9_]*[ \t]*\(\)/g,
58       'sh_function',
59       -1
60     ],
61     [
62       /(?:[A-Za-z]*[-\/]+[A-Za-z]+)+/g,
63       'sh_normal',
64       -1
65     ],
66     [
67       /\b(?:alias|bg|bind|break|builtin|caller|case|command|compgen|complete|continue|declare|dirs|disown|do|done|elif|else|enable|esac|eval|exec|exit|export|false|fc|fg|fi|for|getopts|hash|help|history|if|in|jobs|let|local|logout|popd|printf|pushd|read|readonly|return|select|set|shift|shopt|source|suspend|test|then|times|trap|true|type|typeset|umask|unalias|unset|until|wait|while)\b/g,
68       'sh_keyword',
69       -1
70     ],
71     [
72       /(?:[A-Za-z]|_)[A-Za-z0-9_]*(?==)|\$\{(?:[^ \t]+)\}|\$\((?:[^ \t]+)\)|\$(?:[A-Za-z]|_)[A-Za-z0-9_]*|\$(?:[^ \t]{1})/g,
73       'sh_variable',
74       -1
75     ],
76     [
77       /~|!|%|\^|\*|\(|\)|\+|=|\[|\]|\\|:|;|,|\.|\/|\?|&|<|>|\||%%|(?:##){2}(?!#)/g,
78       'sh_symbol',
79       -1
80     ],
81     [
82       /#/g,
83       'sh_comment',
84       3
85     ]
86   ],
87   [
88     [
89       /"/g,
90       'sh_string',
91       -2
92     ],
93     [
94       /\\./g,
95       'sh_specialchar',
96       -1
97     ]
98   ],
99   [
100     [
101       /'/g,
102       'sh_string',
103       -2
104     ],
105     [
106       /\\./g,
107       'sh_specialchar',
108       -1
109     ]
110   ],
111   [
112     [
113       /$/g,
114       null,
115       -2
116     ]
117   ]