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:
826 bytes
|
Line | |
---|
1 | Prism.languages.awk = {
|
---|
2 | 'hashbang': {
|
---|
3 | pattern: /^#!.*/,
|
---|
4 | greedy: true,
|
---|
5 | alias: 'comment'
|
---|
6 | },
|
---|
7 | 'comment': {
|
---|
8 | pattern: /#.*/,
|
---|
9 | greedy: true
|
---|
10 | },
|
---|
11 | 'string': {
|
---|
12 | pattern: /(^|[^\\])"(?:[^\\"\r\n]|\\.)*"/,
|
---|
13 | lookbehind: true,
|
---|
14 | greedy: true
|
---|
15 | },
|
---|
16 | 'regex': {
|
---|
17 | pattern: /((?:^|[^\w\s)])\s*)\/(?:[^\/\\\r\n]|\\.)*\//,
|
---|
18 | lookbehind: true,
|
---|
19 | greedy: true
|
---|
20 | },
|
---|
21 |
|
---|
22 | 'variable': /\$\w+/,
|
---|
23 | 'keyword': /\b(?:BEGIN|BEGINFILE|END|ENDFILE|break|case|continue|default|delete|do|else|exit|for|function|getline|if|in|next|nextfile|printf?|return|switch|while)\b|@(?:include|load)\b/,
|
---|
24 |
|
---|
25 | 'function': /\b[a-z_]\w*(?=\s*\()/i,
|
---|
26 | 'number': /\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[a-fA-F0-9]+)\b/,
|
---|
27 |
|
---|
28 | 'operator': /--|\+\+|!?~|>&|>>|<<|(?:\*\*|[<>!=+\-*/%^])=?|&&|\|[|&]|[?:]/,
|
---|
29 | 'punctuation': /[()[\]{},;]/
|
---|
30 | };
|
---|
31 |
|
---|
32 | Prism.languages.gawk = Prism.languages.awk;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.