source: node_modules/prismjs/components/prism-solution-file.js

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.1 KB
Line 
1(function (Prism) {
2
3 var guid = {
4 // https://en.wikipedia.org/wiki/Universally_unique_identifier#Format
5 pattern: /\{[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}\}/i,
6 alias: 'constant',
7 inside: {
8 'punctuation': /[{}]/
9 }
10 };
11
12 Prism.languages['solution-file'] = {
13 'comment': {
14 pattern: /#.*/,
15 greedy: true
16 },
17 'string': {
18 pattern: /"[^"\r\n]*"|'[^'\r\n]*'/,
19 greedy: true,
20 inside: {
21 'guid': guid
22 }
23 },
24 'object': {
25 // Foo
26 // Bar("abs") = 9
27 // EndBar
28 // Prop = TRUE
29 // EndFoo
30 pattern: /^([ \t]*)(?:([A-Z]\w*)\b(?=.*(?:\r\n?|\n)(?:\1[ \t].*(?:\r\n?|\n))*\1End\2(?=[ \t]*$))|End[A-Z]\w*(?=[ \t]*$))/m,
31 lookbehind: true,
32 greedy: true,
33 alias: 'keyword'
34 },
35 'property': {
36 pattern: /^([ \t]*)(?!\s)[^\r\n"#=()]*[^\s"#=()](?=\s*=)/m,
37 lookbehind: true,
38 inside: {
39 'guid': guid
40 }
41 },
42 'guid': guid,
43 'number': /\b\d+(?:\.\d+)*\b/,
44 'boolean': /\b(?:FALSE|TRUE)\b/,
45 'operator': /=/,
46 'punctuation': /[(),]/
47 };
48
49 Prism.languages['sln'] = Prism.languages['solution-file'];
50
51}(Prism));
Note: See TracBrowser for help on using the repository browser.