main
Last change
on this file since e48199a was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
1.4 KB
|
Rev | Line | |
---|
[d24f17c] | 1 | 'use strict'
|
---|
| 2 |
|
---|
| 3 | module.exports = pcaxis
|
---|
| 4 | pcaxis.displayName = 'pcaxis'
|
---|
| 5 | pcaxis.aliases = ['px']
|
---|
| 6 | function pcaxis(Prism) {
|
---|
| 7 | Prism.languages.pcaxis = {
|
---|
| 8 | string: /"[^"]*"/,
|
---|
| 9 | keyword: {
|
---|
| 10 | pattern:
|
---|
| 11 | /((?:^|;)\s*)[-A-Z\d]+(?:\s*\[[-\w]+\])?(?:\s*\("[^"]*"(?:,\s*"[^"]*")*\))?(?=\s*=)/,
|
---|
| 12 | lookbehind: true,
|
---|
| 13 | greedy: true,
|
---|
| 14 | inside: {
|
---|
| 15 | keyword: /^[-A-Z\d]+/,
|
---|
| 16 | language: {
|
---|
| 17 | pattern: /^(\s*)\[[-\w]+\]/,
|
---|
| 18 | lookbehind: true,
|
---|
| 19 | inside: {
|
---|
| 20 | punctuation: /^\[|\]$/,
|
---|
| 21 | property: /[-\w]+/
|
---|
| 22 | }
|
---|
| 23 | },
|
---|
| 24 | 'sub-key': {
|
---|
| 25 | pattern: /^(\s*)\S[\s\S]*/,
|
---|
| 26 | lookbehind: true,
|
---|
| 27 | inside: {
|
---|
| 28 | parameter: {
|
---|
| 29 | pattern: /"[^"]*"/,
|
---|
| 30 | alias: 'property'
|
---|
| 31 | },
|
---|
| 32 | punctuation: /^\(|\)$|,/
|
---|
| 33 | }
|
---|
| 34 | }
|
---|
| 35 | }
|
---|
| 36 | },
|
---|
| 37 | operator: /=/,
|
---|
| 38 | tlist: {
|
---|
| 39 | pattern:
|
---|
| 40 | /TLIST\s*\(\s*\w+(?:(?:\s*,\s*"[^"]*")+|\s*,\s*"[^"]*"-"[^"]*")?\s*\)/,
|
---|
| 41 | greedy: true,
|
---|
| 42 | inside: {
|
---|
| 43 | function: /^TLIST/,
|
---|
| 44 | property: {
|
---|
| 45 | pattern: /^(\s*\(\s*)\w+/,
|
---|
| 46 | lookbehind: true
|
---|
| 47 | },
|
---|
| 48 | string: /"[^"]*"/,
|
---|
| 49 | punctuation: /[(),]/,
|
---|
| 50 | operator: /-/
|
---|
| 51 | }
|
---|
| 52 | },
|
---|
| 53 | punctuation: /[;,]/,
|
---|
| 54 | number: {
|
---|
| 55 | pattern: /(^|\s)\d+(?:\.\d+)?(?!\S)/,
|
---|
| 56 | lookbehind: true
|
---|
| 57 | },
|
---|
| 58 | boolean: /NO|YES/
|
---|
| 59 | }
|
---|
| 60 | Prism.languages.px = Prism.languages.pcaxis
|
---|
| 61 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.